Skip to content

Commit 71c5453

Browse files
authored
[compiler-rt] Add hexagon architecture to cmake (#98650)
Add hexagon to detect_target_arch, test_target macros.
1 parent bb46c0b commit 71c5453

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

compiler-rt/cmake/Modules/CompilerRTUtils.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ macro(detect_target_arch)
152152
check_symbol_exists(__aarch64__ "" __AARCH64)
153153
check_symbol_exists(__x86_64__ "" __X86_64)
154154
check_symbol_exists(__i386__ "" __I386)
155+
check_symbol_exists(__hexagon__ "" __HEXAGON)
155156
check_symbol_exists(__loongarch__ "" __LOONGARCH)
156157
check_symbol_exists(__mips__ "" __MIPS)
157158
check_symbol_exists(__mips64__ "" __MIPS64)
@@ -182,6 +183,8 @@ macro(detect_target_arch)
182183
else()
183184
message(FATAL_ERROR "Unsupported pointer size for X86_64")
184185
endif()
186+
elseif(__HEXAGON)
187+
add_default_target_arch(hexagon)
185188
elseif(__I386)
186189
add_default_target_arch(i386)
187190
elseif(__LOONGARCH)

compiler-rt/cmake/base-config-ix.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ macro(test_targets)
218218
test_target_arch(amdgcn "" "--target=amdgcn-amd-amdhsa" "-nogpulib"
219219
"-flto" "-fconvergent-functions"
220220
"-Xclang -mcode-object-version=none")
221+
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "hexagon")
222+
test_target_arch(hexagon "" "")
221223
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "loongarch64")
222224
test_target_arch(loongarch64 "" "")
223225
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "powerpc64le|ppc64le")

0 commit comments

Comments
 (0)