aboutsummaryrefslogtreecommitdiff
path: root/contrib/devtools/symbol-check.py
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-05-05 15:59:09 +0800
committerfanquake <fanquake@gmail.com>2021-06-10 10:40:53 +0800
commit29615aef52d7f1a29a87a29dfe4d39bf0e9867f3 (patch)
treed761b6a1af00e6bf7ac6fdcfd541d7010dac9c1a /contrib/devtools/symbol-check.py
parent8732f7b6c92f9dcf37f3ab618e9daab0c52fc781 (diff)
downloadbitcoin-29615aef52d7f1a29a87a29dfe4d39bf0e9867f3.tar.xz
scripts: check minimum required macOS vesion is set
We use a compile flag (-mmacosx-version-min) to set the minimum required version of macOS needed to run our binaries. This adds a sanity check that the version is being set as expected.
Diffstat (limited to 'contrib/devtools/symbol-check.py')
-rwxr-xr-xcontrib/devtools/symbol-check.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/contrib/devtools/symbol-check.py b/contrib/devtools/symbol-check.py
index d740a94560..5fab2b3285 100755
--- a/contrib/devtools/symbol-check.py
+++ b/contrib/devtools/symbol-check.py
@@ -212,6 +212,12 @@ def check_MACHO_libraries(filename) -> bool:
ok = False
return ok
+def check_MACHO_min_os(filename) -> bool:
+ binary = lief.parse(filename)
+ if binary.build_version.minos == [10,14,0]:
+ return True
+ return False
+
def check_PE_libraries(filename) -> bool:
ok: bool = True
binary = lief.parse(filename)
@@ -228,7 +234,8 @@ CHECKS = {
('LIBRARY_DEPENDENCIES', check_ELF_libraries)
],
'MACHO': [
- ('DYNAMIC_LIBRARIES', check_MACHO_libraries)
+ ('DYNAMIC_LIBRARIES', check_MACHO_libraries),
+ ('MIN_OS', check_MACHO_min_os),
],
'PE' : [
('DYNAMIC_LIBRARIES', check_PE_libraries)