diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2020-12-30 00:03:09 +0000 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2021-01-13 17:00:15 +0000 |
commit | 45514031440880a9eecd2a8461e6741569d8119a (patch) | |
tree | cb1ade8c6d87a5092bdba66161350a5f5ccf286d /SConstruct | |
parent | fefd16acf472dc7fddc57aab3773f2dec6602b20 (diff) | |
download | ComputeLibrary-45514031440880a9eecd2a8461e6741569d8119a.tar.gz |
Add support for macOS
* Add 'macos' as an additional OS build option
* Guard unsupported paths like thread scheduling control and hwcaps
checking with the __APPLE__ macro
* Map linker options to respective Mach-O linker options
Change-Id: I67bd9fa3c20831427b218ca7d3b4b9d454ab4fec
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4788
Reviewed-by: Sang-Hoon Park <sang-hoon.park@arm.com>
Reviewed-by: Giorgio Arena <giorgio.arena@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/SConstruct b/SConstruct index e19d855210..4606159a0f 100644 --- a/SConstruct +++ b/SConstruct @@ -46,7 +46,7 @@ vars.AddVariables( allowed_values=("armv7a", "arm64-v8a", "arm64-v8.2-a", "arm64-v8.2-a-sve", "arm64-v8.2-a-sve2", "x86_32", "x86_64", "armv8a", "armv8.2-a", "armv8.2-a-sve", "armv8.6-a", "armv8.6-a-sve", "armv8.6-a-sve2", "x86")), EnumVariable("estate", "Execution State", "auto", allowed_values=("auto", "32", "64")), - EnumVariable("os", "Target OS", "linux", allowed_values=("linux", "android", "tizen", "bare_metal")), + EnumVariable("os", "Target OS", "linux", allowed_values=("linux", "android", "tizen", "macos", "bare_metal")), EnumVariable("build", "Build type", "cross_compile", allowed_values=("native", "cross_compile", "embed_only")), BoolVariable("examples", "Build example programs", True), BoolVariable("gemm_tuner", "Build gemm_tuner programs", True), @@ -151,8 +151,8 @@ env.Append(CXXFLAGS = ['-Wall','-DARCH_ARM', env.Append(CPPDEFINES = ['_GLIBCXX_USE_NANOSLEEP']) -default_cpp_compiler = 'g++' if env['os'] != 'android' else 'clang++' -default_c_compiler = 'gcc' if env['os'] != 'android' else 'clang' +default_cpp_compiler = 'g++' if env['os'] not in ['android', 'macos'] else 'clang++' +default_c_compiler = 'gcc' if env['os'] not in ['android', 'macos'] else 'clang' cpp_compiler = os.environ.get('CXX', default_cpp_compiler) c_compiler = os.environ.get('CC', default_c_compiler) @@ -220,7 +220,6 @@ elif 'v8' in env['arch']: env.Append(CPPDEFINES = ['MMLA_INT8', 'V8P6', 'V8P6_BF', 'ARM_COMPUTE_FORCE_BF16']) if "disable_mmla_fp" not in env['custom_options']: env.Append(CPPDEFINES = ['MMLA_FP32']) - elif 'x86' in env['arch']: if env['estate'] == '32': env.Append(CCFLAGS = ['-m32']) |