arch.cmake 722 B

123456789101112131415161718192021222324252627
  1. # See https://github.com/llvm/llvm-project/blob/master/compiler-rt/cmake/builtin-config-ix.cmake
  2. IF (ARCH_I386 OR ARCH_I686)
  3. SET(CLANG_ARCH i386)
  4. ELSEIF (ARCH_X86_64)
  5. SET(CLANG_ARCH x86_64)
  6. ELSEIF (ARCH_ARM7 OR ARCH_ARM7_NEON)
  7. SET(CLANG_ARCH armv7)
  8. ELSEIF (ARCH_ARM64 OR ARCH_AARCH64)
  9. IF (OS_DARWIN OR OS_IOS)
  10. SET(CLANG_ARCH arm64)
  11. ELSE()
  12. SET(CLANG_ARCH aarch64)
  13. ENDIF()
  14. ELSEIF (ARCH_PPC64LE)
  15. SET(CLANG_ARCH powerpc64le)
  16. ELSE()
  17. MESSAGE(FATAL_ERROR "Unknown architecture")
  18. ENDIF()
  19. IF (OS_DARWIN)
  20. SET(CLANG_RT_SUFFIX "_osx")
  21. SET(CLANG_RT_DLLSUFFIX "_osx_dynamic")
  22. ELSE()
  23. SET(CLANG_RT_SUFFIX "-${CLANG_ARCH}")
  24. SET(CLANG_RT_DLLSUFFIX "-${CLANG_ARCH}")
  25. ENDIF()