Fixed build errors
* Resolves problem in macOS Monterey + Clang 13 where there is no memalloc and
memalign must be used
* Resolves builld error when passing an empty list of files to the AR
tool
* Resolves MLCE-685
Change-Id: I862ff1dc7f74b2ba32479f6e8abaa32a88d47995
Signed-off-by: Pablo Marquez Tello <pablo.tello@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6706
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Reviewed-by: Giorgio Arena <giorgio.arena@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
diff --git a/SConscript b/SConscript
index 6198445..a8995ac 100644
--- a/SConscript
+++ b/SConscript
@@ -540,7 +540,12 @@
Export('arm_compute_so')
# Generate dummy core lib for backwards compatibility
-arm_compute_core_a = build_library('arm_compute_core-static', arm_compute_env, [], static=True)
+if env['os'] == 'macos':
+ # macos static library archiver fails if given an empty list of files
+ arm_compute_core_a = build_library('arm_compute_core-static', arm_compute_env, [lib_files], static=True)
+else:
+ arm_compute_core_a = build_library('arm_compute_core-static', arm_compute_env, [], static=True)
+
Export('arm_compute_core_a')
if env['os'] != 'bare_metal' and not env['standalone']: