[compiler-rt] 71c5453 - [compiler-rt] Add hexagon architecture to cmake (#98650)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 12 18:10:07 PDT 2024


Author: Brian Cain
Date: 2024-07-12T20:10:03-05:00
New Revision: 71c5453fa9a1fb5bb927589c6d38058552d263b6

URL: https://github.com/llvm/llvm-project/commit/71c5453fa9a1fb5bb927589c6d38058552d263b6
DIFF: https://github.com/llvm/llvm-project/commit/71c5453fa9a1fb5bb927589c6d38058552d263b6.diff

LOG: [compiler-rt] Add hexagon architecture to cmake (#98650)

Add hexagon to detect_target_arch, test_target macros.

Added: 
    

Modified: 
    compiler-rt/cmake/Modules/CompilerRTUtils.cmake
    compiler-rt/cmake/base-config-ix.cmake

Removed: 
    


################################################################################
diff  --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
index 58b02fe48cd8f..379e2c25949cb 100644
--- a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
@@ -152,6 +152,7 @@ macro(detect_target_arch)
   check_symbol_exists(__aarch64__ "" __AARCH64)
   check_symbol_exists(__x86_64__ "" __X86_64)
   check_symbol_exists(__i386__ "" __I386)
+  check_symbol_exists(__hexagon__ "" __HEXAGON)
   check_symbol_exists(__loongarch__ "" __LOONGARCH)
   check_symbol_exists(__mips__ "" __MIPS)
   check_symbol_exists(__mips64__ "" __MIPS64)
@@ -182,6 +183,8 @@ macro(detect_target_arch)
     else()
       message(FATAL_ERROR "Unsupported pointer size for X86_64")
     endif()
+  elseif(__HEXAGON)
+    add_default_target_arch(hexagon)
   elseif(__I386)
     add_default_target_arch(i386)
   elseif(__LOONGARCH)

diff  --git a/compiler-rt/cmake/base-config-ix.cmake b/compiler-rt/cmake/base-config-ix.cmake
index 2d6342b28ea31..80bbca1cbfceb 100644
--- a/compiler-rt/cmake/base-config-ix.cmake
+++ b/compiler-rt/cmake/base-config-ix.cmake
@@ -218,6 +218,8 @@ macro(test_targets)
       test_target_arch(amdgcn "" "--target=amdgcn-amd-amdhsa" "-nogpulib"
                        "-flto" "-fconvergent-functions"
                        "-Xclang -mcode-object-version=none")
+    elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "hexagon")
+      test_target_arch(hexagon "" "")
     elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "loongarch64")
       test_target_arch(loongarch64 "" "")
     elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "powerpc64le|ppc64le")


        


More information about the llvm-commits mailing list