aboutsummaryrefslogtreecommitdiff
path: root/SConscript
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2020-12-30 00:03:09 +0000
committerGeorgios Pinitas <georgios.pinitas@arm.com>2021-01-13 17:00:15 +0000
commit45514031440880a9eecd2a8461e6741569d8119a (patch)
treecb1ade8c6d87a5092bdba66161350a5f5ccf286d /SConscript
parentfefd16acf472dc7fddc57aab3773f2dec6602b20 (diff)
downloadComputeLibrary-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 'SConscript')
-rw-r--r--SConscript5
1 files changed, 3 insertions, 2 deletions
diff --git a/SConscript b/SConscript
index d3732271a1..229d7d1c26 100644
--- a/SConscript
+++ b/SConscript
@@ -137,7 +137,7 @@ arm_compute_env = env.Clone()
version_file = arm_compute_env.Command("src/core/arm_compute_version.embed", "", action=create_version_file)
arm_compute_env.AlwaysBuild(version_file)
-default_cpp_compiler = 'g++' if env['os'] != 'android' else 'clang++'
+default_cpp_compiler = 'g++' if env['os'] not in ['android', 'macos'] else 'clang++'
cpp_compiler = os.environ.get('CXX', default_cpp_compiler)
# Generate embed files
@@ -171,7 +171,8 @@ arm_compute_env.Append(CPPDEFINES = [('ARM_COMPUTE_VERSION_MAJOR', LIBRARY_VERSI
# Don't allow undefined references in the libraries:
-arm_compute_env.Append(LINKFLAGS=['-Wl,--no-undefined'])
+undefined_flag = '-Wl,-undefined,error' if 'macos' in arm_compute_env["os"] else '-Wl,--no-undefined'
+arm_compute_env.Append(LINKFLAGS=[undefined_flag])
arm_compute_env.Append(CPPPATH =[Dir("./src/core/").path] )
arm_compute_env.Append(LIBS = ['dl'])