diff --git a/llvm/utils/gn/build/toolchain/BUILD.gn b/llvm/utils/gn/build/toolchain/BUILD.gn index f48f25c4ca34..864ae45a88ca 100644 --- a/llvm/utils/gn/build/toolchain/BUILD.gn +++ b/llvm/utils/gn/build/toolchain/BUILD.gn @@ -198,7 +198,8 @@ template("stage2_unix_toolchain") { "//:clang($host_toolchain)", "//:lld($host_toolchain)", ] - if (current_os != "ios" && current_os != "mac") { + if (toolchain_args.current_os != "ios" && + toolchain_args.current_os != "mac") { ar = "bin/llvm-ar" deps += [ "//:llvm-ar($host_toolchain)" ] }