[babl/wip/jtojnar/meson-fixes] build: Fix build on Darwin
- From: Jan Tojnar <jtojnar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl/wip/jtojnar/meson-fixes] build: Fix build on Darwin
- Date: Sun, 25 Aug 2019 14:15:52 +0000 (UTC)
commit 4502a6e1d0bb011984d7e6a46ac3f218a1465c33
Author: Jan Tojnar <jtojnar gmail com>
Date: Sun Aug 25 15:46:46 2019 +0200
build: Fix build on Darwin
Apple linker does not support --version-script flag, leading to the following build failure:
[48/181] Linking target babl/libbabl-0.1.0.dylib.
FAILED: babl/libbabl-0.1.0.dylib
/nix/store/4yhnj6g8ixx31jgil477xrir5y3n39im-clang-wrapper-7.1.0/bin/cc -o
babl/libbabl-0.1.0.dylib 'babl/4170c83@@babl-0.1@sha/babl-cache.c.o'
'babl/4170c83@@babl-0.1@sha/babl-component.c.o' 'babl/4170c83@@babl-0.1@sha/babl-conversion.c.o'
'babl/4170c83@@babl-0.1@sha/babl-core.c.o' 'babl/4170c83@@babl-0.1@sha/babl-cpuaccel.c.o'
'babl/4170c83@@babl-0.1@sha/babl-db.c.o' 'babl/4170c83@@babl-0.1@sha/babl-extension.c.o'
'babl/4170c83@@babl-0.1@sha/babl-fish-path.c.o' 'babl/4170c83@@babl-0.1@sha/babl-fish-reference.c.o'
'babl/4170c83@@babl-0.1@sha/babl-fish-simple.c.o' 'babl/4170c83@@babl-0.1@sha/babl-fish.c.o'
'babl/4170c83@@babl-0.1@sha/babl-format.c.o' 'babl/4170c83@@babl-0.1@sha/babl-hash-table.c.o'
'babl/4170c83@@babl-0.1@sha/babl-icc.c.o' 'babl/4170c83@@babl-0.1@sha/babl-image.c.o'
'babl/4170c83@@babl-0.1@sha/babl-internal.c.o' 'babl/4170c83@@babl-0.1@sha/babl-introspect.c.o'
'babl/4170c83@@babl-0.1@sha/babl-list.c.o' 'babl/4170c83@@babl-0.1@sha/babl-memory.c.o'
'babl/41
70c83@@babl-0.1@sha/babl-model.c.o' 'babl/4170c83@@babl-0.1@sha/babl-mutex.c.o'
'babl/4170c83@@babl-0.1@sha/babl-palette.c.o' 'babl/4170c83@@babl-0.1@sha/babl-polynomial.c.o'
'babl/4170c83@@babl-0.1@sha/babl-ref-pixels.c.o' 'babl/4170c83@@babl-0.1@sha/babl-sampling.c.o'
'babl/4170c83@@babl-0.1@sha/babl-sanity.c.o' 'babl/4170c83@@babl-0.1@sha/babl-space.c.o'
'babl/4170c83@@babl-0.1@sha/babl-trc.c.o' 'babl/4170c83@@babl-0.1@sha/babl-type.c.o'
'babl/4170c83@@babl-0.1@sha/babl-util.c.o' 'babl/4170c83@@babl-0.1@sha/babl-version.c.o'
'babl/4170c83@@babl-0.1@sha/babl.c.o' -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -shared
-install_name @rpath/libbabl-0.1.0.dylib -compatibility_version 0 -current_version 0 -Wl,-force_load
babl/base/libbabl_base.a -Wl,--version-script,babl.map -lm -ldl
/nix/store/m0752fpnflfkyf903kf0ycjs8x7w9l1v-lcms2-2.9/lib/liblcms2.dylib -Wl,-headerpad_max_install_names
-Wl,-rpath,/nix/store/m0752fpnflfkyf903kf0ycjs8x7w9l1v-lcms2-2.9/lib
ld: unknown option: --version-script
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
Now we only pass it if the linker supports it.
babl/meson.build | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/babl/meson.build b/babl/meson.build
index b551c9a8d..f452435d5 100644
--- a/babl/meson.build
+++ b/babl/meson.build
@@ -24,9 +24,9 @@ babl_c_args = [
]
# Linker arguments
-babl_link_args = [
+babl_link_args = cc.get_supported_link_arguments([
'-Wl,--version-script,' + version_script,
-]
+])
if platform_win32
babl_link_args += '-Wl,--no-undefined'
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]