[llvm] 43a44f1 - [gn build] Add support for Win/x86 compiler-rt
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 28 14:59:53 PDT 2021
Author: Arthur Eubanks
Date: 2021-07-28T14:59:18-07:00
New Revision: 43a44f1c54b76356673949f665a3a353a393c011
URL: https://github.com/llvm/llvm-project/commit/43a44f1c54b76356673949f665a3a353a393c011
DIFF: https://github.com/llvm/llvm-project/commit/43a44f1c54b76356673949f665a3a353a393c011.diff
LOG: [gn build] Add support for Win/x86 compiler-rt
This allows us to build the x86 profile runtime.
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D106972
Added:
Modified:
llvm/utils/gn/build/toolchain/BUILD.gn
llvm/utils/gn/secondary/compiler-rt/BUILD.gn
llvm/utils/gn/secondary/llvm/triples.gni
Removed:
################################################################################
diff --git a/llvm/utils/gn/build/toolchain/BUILD.gn b/llvm/utils/gn/build/toolchain/BUILD.gn
index 63e61db2d16b6..077bc9db3e3be 100644
--- a/llvm/utils/gn/build/toolchain/BUILD.gn
+++ b/llvm/utils/gn/build/toolchain/BUILD.gn
@@ -373,3 +373,17 @@ win_toolchain("stage2_win") {
"//:lld($host_toolchain)",
]
}
+
+win_toolchain("stage2_win_x86") {
+ toolchain_args = {
+ current_os = host_os
+ current_cpu = "x86"
+
+ clang_base_path = root_build_dir
+ use_goma = false
+ }
+ deps = [
+ "//:clang($host_toolchain)",
+ "//:lld($host_toolchain)",
+ ]
+}
diff --git a/llvm/utils/gn/secondary/compiler-rt/BUILD.gn b/llvm/utils/gn/secondary/compiler-rt/BUILD.gn
index 6d7b54fdd01e8..9fa7c25698086 100644
--- a/llvm/utils/gn/secondary/compiler-rt/BUILD.gn
+++ b/llvm/utils/gn/secondary/compiler-rt/BUILD.gn
@@ -7,6 +7,7 @@ import("//llvm/utils/gn/build/toolchain/compiler.gni")
# toolchains and then lipo them together for the final output.
if (current_os == "win") {
supported_toolchains = [ "//llvm/utils/gn/build/toolchain:stage2_win" ]
+ supported_toolchains += [ "//llvm/utils/gn/build/toolchain:stage2_win_x86" ]
} else {
supported_toolchains = [ "//llvm/utils/gn/build/toolchain:stage2_unix" ]
}
diff --git a/llvm/utils/gn/secondary/llvm/triples.gni b/llvm/utils/gn/secondary/llvm/triples.gni
index a0ea488e04f3d..2f6c08a45b20a 100644
--- a/llvm/utils/gn/secondary/llvm/triples.gni
+++ b/llvm/utils/gn/secondary/llvm/triples.gni
@@ -1,6 +1,8 @@
if (current_cpu == "x86") {
if (current_os == "linux") {
llvm_current_triple = "i386-unknown-linux-gnu"
+ } else if (current_os == "win") {
+ llvm_current_triple = "i386-pc-windows-msvc"
}
} else if (current_cpu == "x64") {
if (current_os == "freebsd") {
More information about the llvm-commits
mailing list