aboutsummaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorSiCong Li <sicong.li@arm.com>2022-07-20 17:45:36 +0100
committerSiCong Li <sicong.li@arm.com>2022-07-25 16:26:11 +0000
commitbf5274d1cbc2ba592b3990c40065e3c843075252 (patch)
tree6916a1d8223ecf01efd79af3643015d7d1df5e2e /SConstruct
parentd208f4f1c2da9e407f86022959c32e8ab9a4aa6e (diff)
downloadComputeLibrary-bf5274d1cbc2ba592b3990c40065e3c843075252.tar.gz
Enable integrated assembler for Androidâ„¢ 13 and onwards only
Since Androidâ„¢ 13, the underlying NDK has deprecated system assembler and favors integrated assembler instead Please also see https://github.com/android/ndk/wiki/Changelog-r23 Resolves COMPMID-5410 Signed-off-by: SiCong Li <sicong.li@arm.com> Change-Id: Ib9fa8a22f6cdb5cb4f0095e15bf332484f709630 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/7956 Benchmark: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Reviewed-by: Ramy Elgammal <ramy.elgammal@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct21
1 files changed, 15 insertions, 6 deletions
diff --git a/SConstruct b/SConstruct
index 7f0ebc1a0b..9e046161ac 100644
--- a/SConstruct
+++ b/SConstruct
@@ -426,12 +426,21 @@ if not GetOption("help"):
if not version_at_least(compiler_ver, '7.0.0') and env['os'] == 'bare_metal':
env.Append(LINKFLAGS = ['-fstack-protector-strong'])
- # For NDK >= r21, clang 9 or above is used
- if env['os'] == 'android' and version_at_least(compiler_ver, '9.0.0'):
- env['ndk_above_r21'] = True
-
- if env['openmp']:
- env.Append(LINKFLAGS = ['-static-openmp'])
+ # Add Android NDK toolchain specific flags
+ if 'clang++' in cpp_compiler and env['os'] == 'android':
+ # For NDK >= r21, clang 9 or above is used
+ if version_at_least(compiler_ver, '9.0.0'):
+ env['ndk_above_r21'] = True
+
+ if env['openmp']:
+ env.Append(LINKFLAGS = ['-static-openmp'])
+
+ # For NDK >= r23, clang 12 or above is used. This condition detects NDK < r23
+ if not version_at_least(compiler_ver, '12.0.0'):
+ # System assembler is deprecated and integrated assembler is preferred since r23.
+ # However integrated assembler has always been suppressed for NDK < r23.
+ # Thus for backward compatibility, we include this flag only for NDK < r23
+ env.Append(CXXFLAGS = ['-no-integrated-as'])
if env['high_priority'] and env['build_config']:
print("The high priority library cannot be built in conjunction with a user-specified build configuration")