summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungha Yang <seungha@centricular.com>2021-04-22 15:36:36 +0900
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-07-01 12:46:04 +0000
commitd872ccfd1c542eb45e6efdd0090607644bfed7a3 (patch)
tree7f4e8e174082b20c4b811e0eecde5221cde8275b
parent66ccc91944a417e0b2d12d269d29550c07a80e29 (diff)
glib: Add workaround for Visual Studio 2019 ARM build
See https://developercommunity.visualstudio.com/t/vs2019-1662-c2039-wait-for-is-not-a-member-of-winr/1080777 Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/699>
-rw-r--r--recipes/glib.recipe2
-rw-r--r--recipes/glib/uwp/0001-meson-Add-workaround-for-Visual-Studio-2019-ARM-buil.patch43
2 files changed, 45 insertions, 0 deletions
diff --git a/recipes/glib.recipe b/recipes/glib.recipe
index 6e85dfa5..8f86494b 100644
--- a/recipes/glib.recipe
+++ b/recipes/glib.recipe
@@ -176,6 +176,8 @@ class Recipe(recipe.Recipe):
'glib/uwp/0018-gio-Disable-win32-API-and-modules-when-unavailable-o.patch',
'glib/uwp/0019-TODO-gdbus-Completely-disable-when-building-for-WinR.patch',
'glib/uwp/0022-TODO-gio-gcontenttype-Needs-porting-to-WinRT-model.patch',
+ # Visual Studio 2019 workaround
+ 'glib/uwp/0001-meson-Add-workaround-for-Visual-Studio-2019-ARM-buil.patch',
]
elif self.config.target_platform in [Platform.DARWIN, Platform.IOS]:
self.files_devel.append(os.path.join('lib', 'glib-2.0', 'include', '*', 'glibconfig.h'))
diff --git a/recipes/glib/uwp/0001-meson-Add-workaround-for-Visual-Studio-2019-ARM-buil.patch b/recipes/glib/uwp/0001-meson-Add-workaround-for-Visual-Studio-2019-ARM-buil.patch
new file mode 100644
index 00000000..f70dfb0f
--- /dev/null
+++ b/recipes/glib/uwp/0001-meson-Add-workaround-for-Visual-Studio-2019-ARM-buil.patch
@@ -0,0 +1,43 @@
+From 322c2534ffc8aaf8a28aebaccac00bbdc3d13201 Mon Sep 17 00:00:00 2001
+From: Seungha Yang <seungha@centricular.com>
+Date: Thu, 22 Apr 2021 15:11:34 +0900
+Subject: [PATCH] meson: Add workaround for Visual Studio 2019 ARM build
+
+See https://developercommunity.visualstudio.com/t/vs2019-1662-c2039-wait-for-is-not-a-member-of-winr/1080777
+---
+ glib/meson.build | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/glib/meson.build b/glib/meson.build
+index 914089c..d93e745 100644
+--- a/glib/meson.build
++++ b/glib/meson.build
+@@ -306,6 +306,7 @@ else
+ glib_sources += 'gmain.c'
+ endif
+
++extra_cpp_args = []
+ if host_system == 'windows'
+ glib_win_rc = configure_file(
+ input: 'glib.rc.in',
+@@ -317,6 +318,9 @@ if host_system == 'windows'
+ glib_sources += files('gwin32.c', 'gspawn-win32.c', 'giowin32.c')
+ if glib_conf.has('G_WINAPI_ONLY_APP')
+ glib_sources += files('gutils-winrt.cpp')
++ # Visual Studio 2019
++ # https://developercommunity.visualstudio.com/t/vs2019-1662-c2039-wait-for-is-not-a-member-of-winr/1080777
++ extra_cpp_args += ['/Zc:twoPhase-']
+ endif
+ platform_deps = [winsock2, cc.find_library('winmm')]
+ if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl'
+@@ -369,6 +373,7 @@ libglib = library('glib-2.0',
+ include_directories : configinc,
+ dependencies : pcre_deps + [thread_dep, libintl, librt] + libiconv + platform_deps + gnulib_libm_dependency,
+ c_args : glib_c_args,
++ cpp_args : glib_c_args + extra_cpp_args,
+ objc_args : glib_c_args,
+ )
+
+--
+2.25.1
+