[vlc-commits] [Git][videolan/vlc][master] 12 commits: codec: remove bogus libqsv_plugin_la_CPPFLAGS
Hugo Beauzée-Luyssen (@chouquette)
gitlab at videolan.org
Thu Mar 17 14:48:56 UTC 2022
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits:
5a631974 by Steve Lhomme at 2022-03-17T14:31:11+00:00
codec: remove bogus libqsv_plugin_la_CPPFLAGS
The statement is useless and misplaced.
It was added in ee8376da7ce447ae91a509bde8eb133b817fcd43.
- - - - -
5140d986 by Steve Lhomme at 2022-03-17T14:31:11+00:00
core: don't link with LIBCOM in the core
It should probably have been a LIBADD anyway
- - - - -
7a776a79 by Steve Lhomme at 2022-03-17T14:31:11+00:00
configure: force -fno-strict-aliasing for C++ modules using COM objects
This avoids potential compiler optimizations when casting to void** when using
IID_PPV_ARGS or WRL.
If the option is not supported we fail the configure as many important C++
modules may not work as expected due to pointer aliasing. In practice this
should never happen as GCC for mingw-w64 and Clang support this correctly..
- - - - -
7dc1ae3b by Steve Lhomme at 2022-03-17T14:31:11+00:00
access: dshow: compile with LIBCOMCXXFLAGS
It's using WRL.
- - - - -
cfafaa87 by Steve Lhomme at 2022-03-17T14:31:11+00:00
qt: compile with LIBCOMCXXFLAGS on Windows
It's using IID_PPV_ARGS and WRL.
- - - - -
d8c930a8 by Steve Lhomme at 2022-03-17T14:31:11+00:00
direct3d11: compile with LIBCOMCXXFLAGS
It's using IID_PPV_ARGS and WRL.
- - - - -
3ee0d28d by Steve Lhomme at 2022-03-17T14:31:11+00:00
freetype: compile dwrite.cpp with LIBCOMCXXFLAGS
It's not using LIBCOM when linking but uses WRL with COM objects coming from
DWriteCreateFactory called indirectly. We could later clean the code with
WRL.
- - - - -
de95c529 by Steve Lhomme at 2022-03-17T14:31:11+00:00
access: screen: compile with LIBCOMCXXFLAGS on Windows
It's using WRL for the DXGI capture.
- - - - -
f39ff6c7 by Steve Lhomme at 2022-03-17T14:31:11+00:00
mft: compile with LIBCOMCXXFLAGS
It's using WRL.
- - - - -
89a3ca6f by Steve Lhomme at 2022-03-17T14:31:11+00:00
hw: d3d11: compile with LIBCOMCXXFLAGS
It's using WRL.
- - - - -
35263e78 by Steve Lhomme at 2022-03-17T14:31:11+00:00
decklink: compile with LIBCOMCXXFLAGS on Windows
It's using IID_PPV_ARGS.
- - - - -
acad6ed0 by Steve Lhomme at 2022-03-17T14:31:11+00:00
modules: add LIBCOMCXXFLAGS to C++ modules using LIBCOM
Even though they don't use WRL or IID_PPV_ARGS yet.
Better safe than sorry.
- - - - -
9 changed files:
- configure.ac
- modules/access/Makefile.am
- modules/codec/Makefile.am
- modules/gui/qt/Makefile.am
- modules/hw/d3d11/Makefile.am
- modules/stream_out/Makefile.am
- modules/text_renderer/Makefile.am
- modules/video_output/Makefile.am
- src/Makefile.am
Changes:
=====================================
configure.ac
=====================================
@@ -388,6 +388,16 @@ AC_ARG_ENABLE([winstore_app],
vlc_winstore_app=0
AS_IF([test "${SYS}" = "mingw32"],[
LIBCOM="-lole32 -loleaut32"
+ AC_LANG_PUSH(C++)
+ AX_CHECK_COMPILE_FLAG([-fno-strict-aliasing], [
+ LIBCOMCXXFLAGS="-fno-strict-aliasing"
+ ],[
+ # fno-strict-aliasing is necessary for WRL and IID_PPV_ARGS to work safely
+ # MSVC doesn't have this option but doesn't do pointer aliasing, so it
+ # should work too
+ AC_MSG_ERROR([-fno-strict-aliasing is necessary for Windows C++ modules])
+ ])
+ AC_LANG_POP(C++)
AS_IF([test "${enable_winstore_app}" = "yes"], [
vlc_winstore_app=1
LIBCOM="-loleaut32"
@@ -400,6 +410,7 @@ AS_IF([test "${SYS}" = "mingw32"],[
AC_DEFINE([VLC_WINSTORE_APP], [1], [Define to 1 if building for Windows Store.])
],[])
AC_SUBST([LIBCOM])
+ AC_SUBST([LIBCOMCXXFLAGS])
])
vlc_build_pdb=0
=====================================
modules/access/Makefile.am
=====================================
@@ -130,6 +130,7 @@ libdecklink_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(CPPFLAGS_decklink)
libdecklink_plugin_la_LIBADD = $(LIBS_decklink)
if HAVE_WIN32
libdecklink_plugin_la_LIBADD += $(LIBCOM)
+libdecklink_plugin_la_CXXFLAGS += $(LIBCOMCXXFLAGS)
endif
if HAVE_LINUX
libdecklink_plugin_la_LIBADD += $(LIBDL)
@@ -166,6 +167,7 @@ endif
libdshow_plugin_la_SOURCES = access/dshow/vlc_dshow.h access/dshow/dshow.cpp access/dshow/access.h \
access/dshow/filter.cpp access/dshow/filter.h access/dshow/crossbar.cpp ../src/win32/mta_holder.h
libdshow_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DSTRSAFE_NO_DEPRECATE
+libdshow_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(LIBCOMCXXFLAGS)
libdshow_plugin_la_LIBADD = $(LIBCOM) -luuid -lstrmiids -lksuser
if HAVE_WIN32_DESKTOP
access_LTLIBRARIES += libdshow_plugin.la
@@ -198,6 +200,7 @@ endif
libscreen_win_plugin_la_SOURCES = access/screen/screen.c access/screen/screen.h \
access/screen/dxgi.cpp
+libscreen_win_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(LIBCOMCXXFLAGS)
libscreen_win_plugin_la_LIBADD = libd3d11_common.la $(LIBCOM) -luuid
if HAVE_WINSTORE
libscreen_win_plugin_la_LIBADD += -ld3d11
@@ -309,6 +312,7 @@ if HAVE_WIN32_DESKTOP
# Work-around automake bug:
# Use an import library for C++ to retain C linker on other platforms.
libbda_la_SOURCES = access/dtv/bdadefs.h access/dtv/bdagraph.cpp access/dtv/bdagraph.hpp
+libbda_la_CXXFLAGS = $(AM_CXXFLAGS) $(LIBCOMCXXFLAGS)
libbda_la_LDFLAGS = -static
libbda_la_LIBADD = -lstrmiids $(LIBCOM) -luuid
noinst_LTLIBRARIES += libbda.la
=====================================
modules/codec/Makefile.am
=====================================
@@ -593,7 +593,6 @@ codec_LTLIBRARIES += $(LTLIBqsv)
### External frameworks ###
libdmo_plugin_la_SOURCES = codec/dmo/dmo.c codec/dmo/dmo.h codec/dmo/buffer.c
-libqsv_plugin_la_CPPFLAGS = $(AM_CPPFLAGS)
libdmo_plugin_la_LIBADD = $(LIBM)
if HAVE_WIN32
libdmo_plugin_la_LIBADD += $(LIBCOM) -luuid
@@ -603,6 +602,7 @@ endif
endif
libmft_plugin_la_SOURCES = codec/mft.cpp
+libmft_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(LIBCOMCXXFLAGS)
if HAVE_WIN32
libmft_plugin_la_LIBADD = $(LIBCOM) -luuid -lmfuuid -lmfplat libvlc_hxxxhelper.la libd3d11_common.la
codec_LTLIBRARIES += libmft_plugin.la
=====================================
modules/gui/qt/Makefile.am
=====================================
@@ -56,6 +56,7 @@ libqt_plugin_la_CXXFLAGS += $(WAYLAND_CLIENT_CFLAGS)
libqt_plugin_la_LIBADD += $(WAYLAND_CLIENT_LIBS)
endif
if HAVE_WIN32
+libqt_plugin_la_CXXFLAGS += $(LIBCOMCXXFLAGS)
libqt_plugin_la_LIBADD += $(LIBCOM) -lcomctl32 -luuid -ld3d11
endif
if UPDATE_CHECK
=====================================
modules/hw/d3d11/Makefile.am
=====================================
@@ -7,6 +7,7 @@ libdirect3d11_filters_plugin_la_SOURCES = hw/d3d11/d3d11_filters.h \
hw/d3d11/d3d11_device.c \
hw/d3d11/d3d11_surface.c \
hw/d3d11/d3d11_processor.c hw/d3d11/d3d11_processor.h
+libdirect3d11_filters_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(LIBCOMCXXFLAGS)
libdirect3d11_filters_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(d3d11dir)'
libdirect3d11_filters_plugin_la_LIBADD = libchroma_copy.la libdeinterlace_common.la libd3d11_common.la $(LIBCOM)
if HAVE_WINSTORE
=====================================
modules/stream_out/Makefile.am
=====================================
@@ -57,6 +57,7 @@ libstream_out_sdi_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(CPPFLAGS_stream_out_sdi)
libstream_out_sdi_plugin_la_LIBADD = $(LIBS_stream_out_sdi)
if HAVE_WIN32
libstream_out_sdi_plugin_la_LIBADD += $(LIBCOM)
+libstream_out_sdi_plugin_la_CXXFLAGS += $(LIBCOMCXXFLAGS)
endif
if HAVE_LINUX
libstream_out_sdi_plugin_la_LIBADD += $(LIBDL)
=====================================
modules/text_renderer/Makefile.am
=====================================
@@ -20,6 +20,7 @@ libfreetype_plugin_la_LDFLAGS = $(FREETYPE_LDFLAGS) -rpath '$(textdir)'
if HAVE_WIN32
libfreetype_plugin_la_SOURCES += text_renderer/freetype/fonts/dwrite.cpp
+libfreetype_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(LIBCOMCXXFLAGS)
libfreetype_plugin_la_LINK = $(CXXLINK)
if HAVE_WIN32_DESKTOP
libfreetype_plugin_la_SOURCES += text_renderer/freetype/fonts/win32.c
@@ -74,6 +75,7 @@ endif
# SAPI TTS (win32)
libsapi_plugin_la_SOURCES = text_renderer/sapi.cpp
libsapi_plugin_la_LIBADD = $(LIBCOM)
+libsapi_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(LIBCOMCXXFLAGS)
if HAVE_SAPI
text_LTLIBRARIES += libsapi_plugin.la
endif
=====================================
modules/video_output/Makefile.am
=====================================
@@ -25,6 +25,7 @@ libdecklinkoutput_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(CPPFLAGS_decklinkoutput)
libdecklinkoutput_plugin_la_LIBADD = $(LIBS_decklinkoutput)
if HAVE_WIN32
libdecklinkoutput_plugin_la_LIBADD += $(LIBCOM)
+libdecklinkoutput_plugin_la_CXXFLAGS += $(LIBCOMCXXFLAGS)
endif
if HAVE_LINUX
libdecklinkoutput_plugin_la_LIBADD += $(LIBDL)
@@ -181,6 +182,7 @@ libdirect3d11_plugin_la_SOURCES = video_output/win32/direct3d11.cpp \
video_output/win32/d3d11_swapchain.cpp video_output/win32/d3d11_swapchain.h \
video_output/win32/dxgi_swapchain.cpp video_output/win32/dxgi_swapchain.h \
video_output/win32/common.c video_output/win32/common.h
+libdirect3d11_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(LIBCOMCXXFLAGS)
libdirect3d11_plugin_la_LIBADD = libchroma_copy.la libd3d11_common.la $(LIBCOM) -luuid
if !HAVE_WINSTORE
libdirect3d11_plugin_la_SOURCES += video_output/win32/events.c \
=====================================
src/Makefile.am
=====================================
@@ -556,7 +556,7 @@ libvlccore_la_LDFLAGS = \
libvlccore_la_DEPENDENCIES = libvlccore.sym
if HAVE_WIN32
libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
-libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT) -avoid-version -Wc,-static $(LIBCOM)
+libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT) -avoid-version -Wc,-static
endif
if HAVE_OS2
libvlccore_la_LDFLAGS += -avoid-version
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4db6521b34a9cfa70274794e34d81d62937a8a36...acad6ed0e18ecfcae70fcfb4ff990eb230f9ae88
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4db6521b34a9cfa70274794e34d81d62937a8a36...acad6ed0e18ecfcae70fcfb4ff990eb230f9ae88
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list