aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-06-02 19:27:49 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-06-06 07:53:10 +0000
commit56a7d8b2b3f0239ef9bd4507c6e28acb4059c5c8 (patch)
treea9f12727cf76e2ad5d0c04f6491ef085440c7804 /run_unittests.py
parent0565262be35423b60a69b5df32c4ca485e976b12 (diff)
downloadmeson-56a7d8b2b3f0239ef9bd4507c6e28acb4059c5c8.zip
meson-56a7d8b2b3f0239ef9bd4507c6e28acb4059c5c8.tar.gz
meson-56a7d8b2b3f0239ef9bd4507c6e28acb4059c5c8.tar.bz2
Warn when Apple bitcode support is enabled and in-use
We have to disable some options, so tell the user about them and point to the documentation so they can read more about it.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/run_unittests.py b/run_unittests.py
index ca8bc62..1400db7 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -3224,13 +3224,17 @@ endian = 'little'
to inspect the compiler database.
'''
if not is_osx():
- raise unittest.SkipTest('Apple bitcode not relevant')
+ raise unittest.SkipTest('Apple bitcode only works on macOS')
testdir = os.path.join(self.common_test_dir, '4 shared')
# Try with bitcode enabled
- self.init(testdir, extra_args='-Db_bitcode=true')
+ out = self.init(testdir, extra_args='-Db_bitcode=true')
+ # Warning was printed
+ self.assertRegex(out, 'WARNING:.*b_bitcode')
+ # Compiler options were added
compdb = self.get_compdb()
self.assertIn('-fembed-bitcode', compdb[0]['command'])
build_ninja = os.path.join(self.builddir, 'build.ninja')
+ # Linker options were added
with open(build_ninja, 'r', encoding='utf-8') as f:
contents = f.read()
m = re.search('LINK_ARGS =.*-bitcode_bundle', contents)