diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2018-11-28 23:45:40 +0000 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2018-12-09 20:40:27 +0000 |
commit | 65160a969e4ec078a8ec740160b3bfc96055bc8c (patch) | |
tree | 10f555d77691fcbb755399df43aca548dec3e591 /run_unittests.py | |
parent | 6700a8bfd71dd831b1dd832efc6b70bfe69879de (diff) | |
download | meson-65160a969e4ec078a8ec740160b3bfc96055bc8c.zip meson-65160a969e4ec078a8ec740160b3bfc96055bc8c.tar.gz meson-65160a969e4ec078a8ec740160b3bfc96055bc8c.tar.bz2 |
Don't rely on -fPIC being ignored where it's meaningless
clang considers it an error to try to use -fPIC for a windows target
v2:
'' isn't consistently elided, use []
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/run_unittests.py b/run_unittests.py index f1b2249..6e5d8c9 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -2165,7 +2165,9 @@ int main(int argc, char **argv) { '/NOLOGO', '/DLL', '/DEBUG', '/IMPLIB:' + impfile, '/OUT:' + outfile, objectfile] else: - extra_args += ['-fPIC'] + if not (compiler.compiler_type.is_windows_compiler or + compiler.compiler_type.is_osx_compiler): + extra_args += ['-fPIC'] link_cmd = compiler.get_exelist() + ['-shared', '-o', outfile, objectfile] if not mesonbuild.mesonlib.is_osx(): link_cmd += ['-Wl,-soname=' + os.path.basename(outfile)] @@ -3495,7 +3497,7 @@ class LinuxlikeTests(BasePlatformTests): is true and not when it is false. This can't be an ordinary test case because we need to inspect the compiler database. ''' - if is_cygwin() or is_osx(): + if is_windows() or is_cygwin() or is_osx(): raise unittest.SkipTest('PIC not relevant') testdir = os.path.join(self.common_test_dir, '3 static') |