diff options
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r-- | mesonbuild/compilers/compilers.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 3d53f27..f464ec8 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -1265,6 +1265,12 @@ class Compiler: raise EnvironmentException( '%s does not support get_profile_use_args ' % self.get_id()) + def get_undefined_link_args(self): + ''' + Get args for allowing undefined symbols when linking to a shared library + ''' + return [] + @enum.unique class CompilerType(enum.Enum): @@ -1511,6 +1517,14 @@ class GnuLikeCompiler(abc.ABC): def get_profile_use_args(self): return ['-fprofile-use', '-fprofile-correction'] + def get_allow_undefined_link_args(self): + if self.compiler_type.is_osx_compiler: + # Apple ld + return ['-Wl,-undefined,dynamic_lookup'] + else: + # GNU ld and LLVM lld + return ['-Wl,--allow-shlib-undefined'] + class GnuCompiler(GnuLikeCompiler): """ |