summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorSterling Augustine <saugustine@google.com>2017-05-01 20:35:02 +0000
committerSterling Augustine <saugustine@google.com>2017-05-01 20:35:02 +0000
commit612bed15f9652384a92a7967c0b62f068bd00088 (patch)
tree38f0f6521cc92c2144cc62441899a0691c76abbf /cmake
parent120e487c471b4dcedc829166cb67b513aab62edc (diff)
Add powerpc64 and powerpc64le to build infrastructure.
From Phab D32031. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301831 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/CompilerRTUtils.cmake6
-rw-r--r--cmake/base-config-ix.cmake5
-rw-r--r--cmake/builtin-config-ix.cmake2
3 files changed, 12 insertions, 1 deletions
diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake
index 3b3a0c153..a04352440 100644
--- a/cmake/Modules/CompilerRTUtils.cmake
+++ b/cmake/Modules/CompilerRTUtils.cmake
@@ -167,6 +167,8 @@ macro(detect_target_arch)
check_symbol_exists(__i386__ "" __I386)
check_symbol_exists(__mips__ "" __MIPS)
check_symbol_exists(__mips64__ "" __MIPS64)
+ check_symbol_exists(__powerpc64__ "" __PPC64)
+ check_symbol_exists(__powerpc64le__ "" __PPC64LE)
check_symbol_exists(__s390x__ "" __S390X)
check_symbol_exists(__wasm32__ "" __WEBASSEMBLY32)
check_symbol_exists(__wasm64__ "" __WEBASSEMBLY64)
@@ -184,6 +186,10 @@ macro(detect_target_arch)
add_default_target_arch(mips64)
elseif(__MIPS)
add_default_target_arch(mips)
+ elseif(__PPC64)
+ add_default_target_arch(powerpc64)
+ elseif(__PPC64LE)
+ add_default_target_arch(powerpc64le)
elseif(__S390X)
add_default_target_arch(s390x)
elseif(__WEBASSEMBLY32)
diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
index 6f9f15139..a46405a55 100644
--- a/cmake/base-config-ix.cmake
+++ b/cmake/base-config-ix.cmake
@@ -4,6 +4,7 @@
# runtime libraries.
include(CheckIncludeFile)
+include(TestBigEndian)
check_include_file(unwind.h HAVE_UNWIND_H)
# Top level target used to build all compiler-rt libraries.
@@ -178,6 +179,10 @@ macro(test_targets)
test_target_arch(aarch32 "" "-march=armv8-a")
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "aarch64")
test_target_arch(aarch64 "" "-march=armv8-a")
+ elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "powerpc64")
+ test_target_arch(powerpc64 "" "--target=powerpc64-unknown-unknown")
+ elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "powerpc64le")
+ test_target_arch(powerpc64le "" "--target=powerpc64le-unknown-unknown")
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "wasm32")
test_target_arch(wasm32 "" "--target=wasm32-unknown-unknown")
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "wasm64")
diff --git a/cmake/builtin-config-ix.cmake b/cmake/builtin-config-ix.cmake
index dc2ec1694..74b4d583d 100644
--- a/cmake/builtin-config-ix.cmake
+++ b/cmake/builtin-config-ix.cmake
@@ -40,7 +40,7 @@ if(APPLE)
endif()
set(ALL_BUILTIN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64}
- ${MIPS32} ${MIPS64} ${WASM32} ${WASM64})
+ ${MIPS32} ${MIPS64} ${PPC64} ${WASM32} ${WASM64})
include(CompilerRTUtils)
include(CompilerRTDarwinUtils)