diff options
author | Nico Weber <nicolasweber@gmx.de> | 2019-01-18 04:09:30 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2019-01-18 04:09:30 +0000 |
commit | 1e8b76ed77e8962859ff1db6be598a7f070cfb78 (patch) | |
tree | 66f42f4f3f4fc13e1db5c5265081043e722a6aa8 | |
parent | 5a72aa10bf0bd8ba2267372077650d57a2e8bbdd (diff) | |
download | bcm5719-llvm-1e8b76ed77e8962859ff1db6be598a7f070cfb78.tar.gz bcm5719-llvm-1e8b76ed77e8962859ff1db6be598a7f070cfb78.zip |
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
llvm-svn: 351519
-rw-r--r-- | llvm/utils/gn/build/toolchain/BUILD.gn | 8 | ||||
-rw-r--r-- | llvm/utils/gn/secondary/BUILD.gn | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/llvm/utils/gn/build/toolchain/BUILD.gn b/llvm/utils/gn/build/toolchain/BUILD.gn index 97c64ffdf2d..ea0c68359a1 100644 --- a/llvm/utils/gn/build/toolchain/BUILD.gn +++ b/llvm/utils/gn/build/toolchain/BUILD.gn @@ -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)" ] + } } } diff --git a/llvm/utils/gn/secondary/BUILD.gn b/llvm/utils/gn/secondary/BUILD.gn index b8b748b8a2a..0c79cd05c80 100644 --- a/llvm/utils/gn/secondary/BUILD.gn +++ b/llvm/utils/gn/secondary/BUILD.gn @@ -5,10 +5,12 @@ import("//llvm/utils/gn/build/toolchain/compiler.gni") 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 } |