[PATCH] D101961: [gn build] Support compiler-rt/profile on Windows
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 5 16:38:40 PDT 2021
aeubanks created this revision.
aeubanks added a reviewer: thakis.
Herald added a subscriber: dberris.
aeubanks requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D101961
Files:
llvm/utils/gn/secondary/BUILD.gn
llvm/utils/gn/secondary/compiler-rt/BUILD.gn
llvm/utils/gn/secondary/compiler-rt/lib/BUILD.gn
llvm/utils/gn/secondary/compiler-rt/target.gni
Index: llvm/utils/gn/secondary/compiler-rt/target.gni
===================================================================
--- llvm/utils/gn/secondary/compiler-rt/target.gni
+++ llvm/utils/gn/secondary/compiler-rt/target.gni
@@ -28,6 +28,9 @@
}
} else if (current_os == "ios" || current_os == "mac") {
crt_current_out_dir = "$clang_resource_dir/lib/darwin"
+} else if (current_os == "win") {
+ crt_current_out_dir = "$clang_resource_dir/lib/windows"
+ crt_current_target_suffix = "-$crt_current_target_arch"
} else {
assert(false, "unimplemented current_os " + current_os)
}
Index: llvm/utils/gn/secondary/compiler-rt/lib/BUILD.gn
===================================================================
--- llvm/utils/gn/secondary/compiler-rt/lib/BUILD.gn
+++ llvm/utils/gn/secondary/compiler-rt/lib/BUILD.gn
@@ -1,8 +1,10 @@
group("lib") {
- deps = [
- "//compiler-rt/lib/asan",
- "//compiler-rt/lib/builtins",
- "//compiler-rt/lib/profile",
- "//compiler-rt/lib/tsan",
- ]
+ deps = [ "//compiler-rt/lib/profile" ]
+ if (current_os != "win") {
+ deps += [
+ "//compiler-rt/lib/asan",
+ "//compiler-rt/lib/builtins",
+ "//compiler-rt/lib/tsan",
+ ]
+ }
}
Index: llvm/utils/gn/secondary/compiler-rt/BUILD.gn
===================================================================
--- llvm/utils/gn/secondary/compiler-rt/BUILD.gn
+++ llvm/utils/gn/secondary/compiler-rt/BUILD.gn
@@ -5,7 +5,11 @@
# In the GN build, compiler-rt is always built by just-built clang and lld.
# FIXME: For macOS and iOS builds, depend on lib in all needed target arch
# toolchains and then lipo them together for the final output.
-supported_toolchains = [ "//llvm/utils/gn/build/toolchain:stage2_unix" ]
+if (current_os == "win") {
+ supported_toolchains = [ "//llvm/utils/gn/build/toolchain:win" ]
+} else {
+ supported_toolchains = [ "//llvm/utils/gn/build/toolchain:stage2_unix" ]
+}
if (android_ndk_path != "") {
supported_toolchains += [
"//llvm/utils/gn/build/toolchain:stage2_android_aarch64",
Index: llvm/utils/gn/secondary/BUILD.gn
===================================================================
--- llvm/utils/gn/secondary/BUILD.gn
+++ llvm/utils/gn/secondary/BUILD.gn
@@ -8,6 +8,7 @@
"//clang-tools-extra/test",
"//clang/test",
"//clang/tools/scan-build",
+ "//compiler-rt",
"//compiler-rt/include",
"//compiler-rt/lib/scudo",
"//lld/test",
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101961.343236.patch
Type: text/x-patch
Size: 2426 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210505/a9b6c8cf/attachment.bin>
More information about the llvm-commits
mailing list