Index: llvm/trunk/utils/gn/build/toolchain/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/build/toolchain/BUILD.gn +++ llvm/trunk/utils/gn/build/toolchain/BUILD.gn @@ -157,13 +157,17 @@ 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)" ] + } } } Index: llvm/trunk/utils/gn/secondary/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/BUILD.gn +++ llvm/trunk/utils/gn/secondary/BUILD.gn @@ -5,10 +5,12 @@ 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 }