[PATCH] D58839: gn build: Add 32-bit Linux support.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 5 17:28:17 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL355467: gn build: Add 32-bit Linux support. (authored by pcc, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D58839?vs=188942&id=189430#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58839/new/
https://reviews.llvm.org/D58839
Files:
llvm/trunk/utils/gn/build/toolchain/target_flags.gni
llvm/trunk/utils/gn/secondary/compiler-rt/target.gni
llvm/trunk/utils/gn/secondary/llvm/triples.gni
Index: llvm/trunk/utils/gn/secondary/compiler-rt/target.gni
===================================================================
--- llvm/trunk/utils/gn/secondary/compiler-rt/target.gni
+++ llvm/trunk/utils/gn/secondary/compiler-rt/target.gni
@@ -6,7 +6,9 @@
assert(false, "unimplemented current_os " + current_os)
}
-if (current_cpu == "x64") {
+if (current_cpu == "x86") {
+ crt_current_target_arch = "i386"
+} else if (current_cpu == "x64") {
crt_current_target_arch = "x86_64"
} else if (current_cpu == "arm64") {
crt_current_target_arch = "aarch64"
Index: llvm/trunk/utils/gn/secondary/llvm/triples.gni
===================================================================
--- llvm/trunk/utils/gn/secondary/llvm/triples.gni
+++ llvm/trunk/utils/gn/secondary/llvm/triples.gni
@@ -1,4 +1,8 @@
-if (current_cpu == "x64") {
+if (current_cpu == "x86") {
+ if (current_os == "linux") {
+ llvm_current_triple = "i386-unknown-linux-gnu"
+ }
+} else if (current_cpu == "x64") {
if (current_os == "freebsd") {
llvm_current_triple = "x86_64-unknown-freebsd"
} else if (current_os == "linux") {
Index: llvm/trunk/utils/gn/build/toolchain/target_flags.gni
===================================================================
--- llvm/trunk/utils/gn/build/toolchain/target_flags.gni
+++ llvm/trunk/utils/gn/build/toolchain/target_flags.gni
@@ -12,3 +12,7 @@
]
target_ldflags += [ "-static-libstdc++" ]
}
+
+if (current_cpu == "x86") {
+ target_flags = [ "-m32" ]
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58839.189430.patch
Type: text/x-patch
Size: 1491 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190306/5449115e/attachment.bin>
More information about the llvm-commits
mailing list