Skip to content

Commit

Permalink
[gn build] Add support for Win/x86 compiler-rt
Browse files Browse the repository at this point in the history
This allows us to build the x86 profile runtime.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D106972
  • Loading branch information
aeubanks committed Jul 28, 2021
1 parent ef2627e commit 43a44f1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions llvm/utils/gn/build/toolchain/BUILD.gn
Expand Up @@ -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)",
]
}
1 change: 1 addition & 0 deletions llvm/utils/gn/secondary/compiler-rt/BUILD.gn
Expand Up @@ -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" ]
}
Expand Down
2 changes: 2 additions & 0 deletions 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") {
Expand Down

0 comments on commit 43a44f1

Please sign in to comment.