diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2021-04-21 18:29:35 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-04-22 16:53:43 +0300 |
commit | 4881c2cf98506313876c299b6e4937041f314474 (patch) | |
tree | 3f87d4c6d6ec32531377a45d16e4bc390902da15 | |
parent | 59e8962c2520abbb767e91d8dd50b53b865440b0 (diff) | |
download | meson-4881c2cf98506313876c299b6e4937041f314474.zip meson-4881c2cf98506313876c299b6e4937041f314474.tar.gz meson-4881c2cf98506313876c299b6e4937041f314474.tar.bz2 |
Xcode: skip link language override test.
-rw-r--r-- | mesonbuild/backend/xcodebackend.py | 2 | ||||
-rw-r--r-- | test cases/common/139 C and CPP link/meson.build | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/mesonbuild/backend/xcodebackend.py b/mesonbuild/backend/xcodebackend.py index d9ea75b..49e7595 100644 --- a/mesonbuild/backend/xcodebackend.py +++ b/mesonbuild/backend/xcodebackend.py @@ -1345,8 +1345,8 @@ class XCodeBackend(backends.Backend): product_name = target.get_basename() ldargs += target.link_args linker, stdlib_args = self.determine_linker_and_stdlib_args(target) - ldargs += self.build.get_project_link_args(linker, target.subproject, target.for_machine) if not isinstance(target, build.StaticLibrary): + ldargs += self.build.get_project_link_args(linker, target.subproject, target.for_machine) ldargs += self.build.get_global_link_args(linker, target.for_machine) cargs = [] for dep in target.get_external_deps(): diff --git a/test cases/common/139 C and CPP link/meson.build b/test cases/common/139 C and CPP link/meson.build index a93a981..32d1843 100644 --- a/test cases/common/139 C and CPP link/meson.build +++ b/test cases/common/139 C and CPP link/meson.build @@ -14,6 +14,16 @@ project('C and C++ static link test', ['c', 'cpp']) +if meson.backend() == 'xcode' + error('''MESON_SKIP_TEST: overriding link language is not supported in Xcode. + +If you really need this, then patches are welcome. The only known way is +to create a dummy C++ file in the meson-private directory and adding +that to the target's source list when needed. The primitives exist +but may need some tweaking. Grep for language_stdlib_only_link_flags to find +where this is handled in other backends.''') +endif + # Verify that adding link arguments works. add_global_link_arguments('', language : 'c') add_project_link_arguments('', language : 'c') |