[babl] build: fix build failure - check for usnsupported args with clang cross-compile to windows
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] build: fix build failure - check for usnsupported args with clang cross-compile to windows
- Date: Sun, 28 Jun 2020 15:25:38 +0000 (UTC)
commit a7b60ecdfa3fcae127577fe11ecc0cebfec966d6
Author: John Marshall <jtm home gmail com>
Date: Sun Jun 7 15:53:29 2020 +0100
build: fix build failure
- check for usnsupported args with clang cross-compile to windows
babl/meson.build | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/babl/meson.build b/babl/meson.build
index 4b6fff49b..89fa6988f 100644
--- a/babl/meson.build
+++ b/babl/meson.build
@@ -34,13 +34,18 @@ babl_c_args = [
# Linker arguments
if cc.links('', name: '-Wl,--version-script', args: ['-shared', '-Wl,--version-script=' + babl_gnu_sym_path])
babl_link_args = ['-Wl,--version-script,' + version_script]
-elif host_machine.system() == 'darwin' and cc.has_multi_link_arguments('-Wl,-exported_symbols_list',
babl_clang_sym_path)
- # Clang on Darwin
- babl_link_args = ['-Wl,-exported_symbols_list',version_script_clang]
+elif cc.get_id() == 'clang'
+ if cc.links('', name: '-Wl,-exported_symbols_list', args: ['-Wl,-exported_symbols_list',
babl_clang_sym_path])
+ # Clang on Darwin
+ babl_link_args = ['-Wl,-exported_symbols_list',version_script_clang]
+ else
+ # Clang on windws
+ babl_link_args = []
+ endif
else
error('Linker doesn\'t support --version-script or -exported_symbols_list')
endif
-if platform_win32
+if platform_win32 and cc.has_link_argument('-Wl,--no-undefined')
babl_link_args += '-Wl,--no-undefined'
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]