[llvm] r351519 - gn build: unbreak mac (and maybe win) after r351258, r351277
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 17 20:09:30 PST 2019
Author: nico
Date: Thu Jan 17 20:09:30 2019
New Revision: 351519
URL: http://llvm.org/viewvc/llvm-project?rev=351519&view=rev
Log:
gn build: unbreak mac (and maybe win) after r351258, r351277
The check-hwasan build files assert that current_os == "linux" || current_os ==
"android", so pull it in only there.
ar is unused on mac, so don't set it in the stage2 toolchain. (It'd be nicer to
use llvm-libtool on mac instead of host libtool, but llvm-libtool doesn't seem
to understand the -no_warning_for_no_symbols flag.)
Differential Revision: https://reviews.llvm.org/D56898
Modified:
llvm/trunk/utils/gn/build/toolchain/BUILD.gn
llvm/trunk/utils/gn/secondary/BUILD.gn
Modified: llvm/trunk/utils/gn/build/toolchain/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/build/toolchain/BUILD.gn?rev=351519&r1=351518&r2=351519&view=diff
==============================================================================
--- llvm/trunk/utils/gn/build/toolchain/BUILD.gn (original)
+++ llvm/trunk/utils/gn/build/toolchain/BUILD.gn Thu Jan 17 20:09:30 2019
@@ -157,13 +157,17 @@ template("stage2_unix_toolchain") {
cc = "bin/clang"
cxx = "bin/clang++"
ld = cxx
- ar = "bin/llvm-ar"
+ if (current_os != "mac") {
+ ar = "bin/llvm-ar"
+ }
deps = [
"//:clang($host_toolchain)",
"//:lld($host_toolchain)",
- "//:llvm-ar($host_toolchain)",
]
+ if (current_os != "mac") {
+ deps += [ "//:llvm-ar($host_toolchain)" ]
+ }
}
}
Modified: llvm/trunk/utils/gn/secondary/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/BUILD.gn?rev=351519&r1=351518&r2=351519&view=diff
==============================================================================
--- llvm/trunk/utils/gn/secondary/BUILD.gn (original)
+++ llvm/trunk/utils/gn/secondary/BUILD.gn Thu Jan 17 20:09:30 2019
@@ -5,10 +5,12 @@ import("//llvm/utils/gn/build/toolchain/
group("default") {
deps = [
"//clang/test",
- "//compiler-rt/test/hwasan",
"//lld/test",
"//llvm/test",
]
+ if (current_os == "linux" || current_os == "android") {
+ deps += [ "//compiler-rt/test/hwasan" ]
+ }
testonly = true
}
More information about the llvm-commits
mailing list