diff options
author | fanquake <fanquake@gmail.com> | 2021-05-09 16:18:53 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2021-06-10 15:43:50 +0800 |
commit | aa80b5759dfa613780a99801641519dd78bb3eca (patch) | |
tree | 78334822f6d283c3dd39956f188965000325fe28 /contrib/devtools/symbol-check.py | |
parent | c972345bacd0cb01371b3f00941e81dce16278e1 (diff) | |
download | bitcoin-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/symbol-check.py')
-rwxr-xr-x | contrib/devtools/symbol-check.py | 7 |
1 files changed, 7 insertions, 0 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), |