Skip to content

Commit 00fb788

Browse files
waahm7graebm
andauthored
Cleanup SharedLib Immediately + Bump Minimum MacOS version to 10.15 (#877)
Co-authored-by: Michael Graeb <graebm@amazon.com>
1 parent 4e106dc commit 00fb788

13 files changed

Lines changed: 51 additions & 37 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Building:
4343

4444
### OSX
4545
Requirements:
46+
* MacOS: 10.15+
4647
* cmake 3.9+
4748
* ninja
4849
* Java: Any JDK8 or above, ensure `JAVA_HOME` is set

codebuild/macos_compatibility_check.py

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,9 @@ def main():
1111
sys.exit(0)
1212

1313
# Default target macos version setup in pom.xml > ${cmake.min_osx_version}
14-
supported_version = "10.9"
14+
supported_version = "10.15"
1515
arch = "x86_64"
1616

17-
18-
# otool result has a different format between arm and x64
19-
# for arm: we check for "minos"
20-
# for x64: The format will be:
21-
#
22-
# Load command 8
23-
# cmd LC_VERSION_MIN_MACOSX
24-
# cmdsize 16
25-
# version 10.9
26-
# sdk 12.1
27-
# Load command 9
28-
otool_cmd = "otool -l target/cmake-build/lib/osx/{}/cruntime/libaws-crt-jni.dylib | grep -A3 \'LC_VERSION_MIN_MACOSX\' | grep -E version | tr -s ' ' | cut -f3 -d' ' | tr -d '[:space:]'".format(arch)
29-
3017
if len(sys.argv) > 1:
3118
# Parsing the macos archtecture
3219
arch = sys.argv[1]
@@ -39,7 +26,26 @@ def main():
3926
arch = "armv8"
4027
# The oldest version we can target on arm64 is 11.0
4128
supported_version = "11.0"
42-
otool_cmd = "otool -l target/cmake-build/lib/osx/{}/cruntime/libaws-crt-jni.dylib | grep -E minos | tr -s ' ' | cut -f3 -d' ' | tr -d ' ' | tr -d '[:space:]'".format(arch)
29+
30+
# otool result has a different format between arm and x64
31+
# for arm: we check for "minos"
32+
# for x64: The format will be:
33+
#
34+
# Load command 8
35+
# cmd LC_VERSION_MIN_MACOSX
36+
# cmdsize 16
37+
# version 10.15
38+
# sdk 12.1
39+
# Load command 9
40+
otool_cmd = """
41+
otool -l target/cmake-build/lib/osx/{}/cruntime/libaws-crt-jni.dylib |
42+
grep -A5 -E 'LC_VERSION_MIN_MACOSX|LC_BUILD_VERSION' |
43+
grep -E '(version|minos)' |
44+
head -1 |
45+
tr -s ' ' |
46+
cut -f3 -d' ' |
47+
tr -d '[:space:]'
48+
""".format(arch)
4349

4450
print("Start to validate the build binary for MacOS with architecture {}, expected min os version: {}".format(arch,supported_version))
4551
result = subprocess.check_output(otool_cmd, shell=True).decode("utf-8")
@@ -54,3 +60,4 @@ def main():
5460

5561
if __name__ == "__main__":
5662
main()
63+

crt/aws-c-io

Submodule aws-c-io updated 45 files

crt/aws-lc

0 commit comments

Comments
 (0)