d3d11: fix building with address sanitizer
authorAlexander Slobodeniuk <aslobodeniuk@fluendo.com>
Thu, 7 Dec 2023 14:36:26 +0000 (15:36 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 8 Dec 2023 10:19:18 +0000 (10:19 +0000)
When building with address sanitizer it gives next error:
"gstd3d11window_corewindow.cpp : fatal error C1128: number of sections
exceeded object file format limit: compile with /bigobj"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5782>

subprojects/gst-plugins-bad/sys/d3d11/meson.build

index 1368b79..1fb516b 100644 (file)
@@ -73,6 +73,9 @@ if d3d11_winapi_app
   d3d11_sources += ['gstd3d11window_corewindow.cpp',
                     'gstd3d11window_swapchainpanel.cpp']
   extra_dep += [runtimeobject_lib]
+  if cc.get_id() == 'msvc' and get_option('b_sanitize') == 'address'
+    extra_args += ['/bigobj']
+  endif
 endif
 
 if d3d11_winapi_desktop