diff options
Diffstat (limited to 'contrib/devtools')
-rwxr-xr-x | contrib/devtools/symbol-check.py | 7 | ||||
-rwxr-xr-x | contrib/devtools/test-symbol-check.py | 6 |
2 files changed, 10 insertions, 3 deletions
diff --git a/contrib/devtools/symbol-check.py b/contrib/devtools/symbol-check.py index aa189003c6..7a5a42c5d2 100755 --- a/contrib/devtools/symbol-check.py +++ b/contrib/devtools/symbol-check.py @@ -218,6 +218,12 @@ def check_MACHO_min_os(filename) -> bool: return True return False +def check_MACHO_sdk(filename) -> bool: + binary = lief.parse(filename) + if binary.build_version.sdk == [10, 15, 6]: + return True + return False + def check_PE_libraries(filename) -> bool: ok: bool = True binary = lief.parse(filename) @@ -244,6 +250,7 @@ CHECKS = { 'MACHO': [ ('DYNAMIC_LIBRARIES', check_MACHO_libraries), ('MIN_OS', check_MACHO_min_os), + ('SDK', check_MACHO_sdk), ], 'PE' : [ ('DYNAMIC_LIBRARIES', check_PE_libraries), 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' |