[llvm] r360553 - gn build: support host build on ppc64 (a.k.a. powerpc64le)
David L. Jones via llvm-commits
llvm-commits at lists.llvm.org
Sun May 12 21:07:54 PDT 2019
Author: dlj
Date: Sun May 12 21:07:54 2019
New Revision: 360553
URL: http://llvm.org/viewvc/llvm-project?rev=360553&view=rev
Log:
gn build: support host build on ppc64 (a.k.a. powerpc64le)
Modified:
llvm/trunk/utils/gn/secondary/clang/test/BUILD.gn
llvm/trunk/utils/gn/secondary/compiler-rt/target.gni
llvm/trunk/utils/gn/secondary/lld/test/BUILD.gn
llvm/trunk/utils/gn/secondary/llvm/lib/Target/targets.gni
llvm/trunk/utils/gn/secondary/llvm/test/BUILD.gn
llvm/trunk/utils/gn/secondary/llvm/triples.gni
Modified: llvm/trunk/utils/gn/secondary/clang/test/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/clang/test/BUILD.gn?rev=360553&r1=360552&r2=360553&view=diff
==============================================================================
--- llvm/trunk/utils/gn/secondary/clang/test/BUILD.gn (original)
+++ llvm/trunk/utils/gn/secondary/clang/test/BUILD.gn Sun May 12 21:07:54 2019
@@ -79,6 +79,8 @@ write_lit_config("lit_site_cfg") {
if (host_cpu == "x64") {
extra_values += [ "HOST_ARCH=x86_64" ]
+ } else if (host_cpu == "ppc64") {
+ extra_values += [ "HOST_ARCH=powerpc64le" ]
} else {
assert(false, "unimplemented host_cpu " + host_cpu)
}
Modified: llvm/trunk/utils/gn/secondary/compiler-rt/target.gni
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/compiler-rt/target.gni?rev=360553&r1=360552&r2=360553&view=diff
==============================================================================
--- llvm/trunk/utils/gn/secondary/compiler-rt/target.gni (original)
+++ llvm/trunk/utils/gn/secondary/compiler-rt/target.gni Sun May 12 21:07:54 2019
@@ -7,6 +7,8 @@ if (current_cpu == "x86") {
crt_current_target_arch = "x86_64"
} else if (current_cpu == "arm64") {
crt_current_target_arch = "aarch64"
+} else if (current_cpu == "ppc64") {
+ crt_current_target_arch = "powerpc64le"
} else {
assert(false, "unimplemented current_cpu " + current_cpu)
}
Modified: llvm/trunk/utils/gn/secondary/lld/test/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/lld/test/BUILD.gn?rev=360553&r1=360552&r2=360553&view=diff
==============================================================================
--- llvm/trunk/utils/gn/secondary/lld/test/BUILD.gn (original)
+++ llvm/trunk/utils/gn/secondary/lld/test/BUILD.gn Sun May 12 21:07:54 2019
@@ -54,7 +54,8 @@ write_lit_cfg("lit_site_cfg") {
extra_values += [ "HAVE_LIBZ=0" ] # Must be 0.
}
- if (current_cpu == "x64" || current_cpu == "arm64") {
+ if (current_cpu == "x64" || current_cpu == "arm64" ||
+ current_cpu == "ppc64") {
extra_values += [ "CMAKE_SIZEOF_VOID_P=8" ]
} else {
extra_values += [ "CMAKE_SIZEOF_VOID_P=4" ]
Modified: llvm/trunk/utils/gn/secondary/llvm/lib/Target/targets.gni
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/lib/Target/targets.gni?rev=360553&r1=360552&r2=360553&view=diff
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/lib/Target/targets.gni (original)
+++ llvm/trunk/utils/gn/secondary/llvm/lib/Target/targets.gni Sun May 12 21:07:54 2019
@@ -10,7 +10,7 @@ if (llvm_targets_to_build == "host") {
llvm_targets_to_build = [ "AArch64" ]
} else if (host_cpu == "arm") {
llvm_targets_to_build = [ "ARM" ]
- } else if (host_cpu == "pcc" || host_cpu == "pcc64") {
+ } else if (host_cpu == "ppc" || host_cpu == "ppc64") {
llvm_targets_to_build = [ "PowerPC" ]
} else if (host_cpu == "x86" || host_cpu == "x64") {
llvm_targets_to_build = [ "X86" ]
@@ -61,8 +61,8 @@ if (host_cpu == "arm64") {
native_target = "AArch64"
} else if (host_cpu == "arm") {
native_target = "ARM"
-} else if (host_cpu == "pcc" || host_cpu == "pcc64") {
- native_target = [ "PowerPC" ]
+} else if (host_cpu == "ppc" || host_cpu == "ppc64") {
+ native_target = "PowerPC"
} else if (host_cpu == "x86" || host_cpu == "x64") {
native_target = "X86"
} else {
Modified: llvm/trunk/utils/gn/secondary/llvm/test/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/test/BUILD.gn?rev=360553&r1=360552&r2=360553&view=diff
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/test/BUILD.gn (original)
+++ llvm/trunk/utils/gn/secondary/llvm/test/BUILD.gn Sun May 12 21:07:54 2019
@@ -80,6 +80,8 @@ write_lit_config("lit_site_cfg") {
if (host_cpu == "x64") {
extra_values += [ "HOST_ARCH=x86_64" ]
+ } else if (host_cpu == "ppc64") {
+ extra_values += [ "HOST_ARCH=powerpc64le" ]
} else {
assert(false, "unimplemented host_cpu " + host_cpu)
}
Modified: llvm/trunk/utils/gn/secondary/llvm/triples.gni
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/triples.gni?rev=360553&r1=360552&r2=360553&view=diff
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/triples.gni (original)
+++ llvm/trunk/utils/gn/secondary/llvm/triples.gni Sun May 12 21:07:54 2019
@@ -16,6 +16,10 @@ if (current_cpu == "x86") {
if (current_os == "android") {
llvm_current_triple = "aarch64-linux-android21"
}
+} else if (current_cpu == "ppc64") {
+ if (current_os == "linux") {
+ llvm_current_triple = "powerpc64le-unknown-linux-gnu"
+ }
}
if (!defined(llvm_current_triple)) {
More information about the llvm-commits
mailing list