aboutsummaryrefslogtreecommitdiff
path: root/contrib/devtools/test-symbol-check.py
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-05-09 16:18:53 +0800
committerfanquake <fanquake@gmail.com>2021-06-10 15:43:50 +0800
commitaa80b5759dfa613780a99801641519dd78bb3eca (patch)
tree78334822f6d283c3dd39956f188965000325fe28 /contrib/devtools/test-symbol-check.py
parentc972345bacd0cb01371b3f00941e81dce16278e1 (diff)
downloadbitcoin-aa80b5759dfa613780a99801641519dd78bb3eca.tar.xz
scripts: check macOS SDK version is set
Clangs Darwin driver should infer the SDK version used during compilation, and forward that through to the linker. Add a check that this has been done, and the expected SDK version is set. Should help prevent issues like #21771 in future.
Diffstat (limited to 'contrib/devtools/test-symbol-check.py')
-rwxr-xr-xcontrib/devtools/test-symbol-check.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/devtools/test-symbol-check.py b/contrib/devtools/test-symbol-check.py
index f888621619..6ce2fa3560 100755
--- a/contrib/devtools/test-symbol-check.py
+++ b/contrib/devtools/test-symbol-check.py
@@ -98,7 +98,7 @@ class TestSymbolChecks(unittest.TestCase):
self.assertEqual(call_symbol_check(cc, source, executable, ['-lexpat']),
(1, 'libexpat.1.dylib is not in ALLOWED_LIBRARIES!\n' +
- executable + ': failed DYNAMIC_LIBRARIES MIN_OS'))
+ f'{executable}: failed DYNAMIC_LIBRARIES MIN_OS SDK'))
source = 'test2.c'
executable = 'test2'
@@ -114,7 +114,7 @@ class TestSymbolChecks(unittest.TestCase):
''')
self.assertEqual(call_symbol_check(cc, source, executable, ['-framework', 'CoreGraphics']),
- (1, executable + ': failed MIN_OS'))
+ (1, f'{executable}: failed MIN_OS SDK'))
source = 'test3.c'
executable = 'test3'
@@ -127,7 +127,7 @@ class TestSymbolChecks(unittest.TestCase):
''')
self.assertEqual(call_symbol_check(cc, source, executable, ['-mmacosx-version-min=10.14']),
- (0, ''))
+ (1, f'{executable}: failed SDK'))
def test_PE(self):
source = 'test1.c'