Skip to content

Commit 2fb5621

Browse files
committed
Swift: replace $(CC) with clang
On macOS `$(CC)` points to a wrapper that requires `DEVELOPER_DIR` to be set in the environment. Using `clang` is slightly less generic, but that's our default any way. Even if we do set a different clang version somewhere, the selected version of GCC would not change, and the test is targeting that.
1 parent 943763a commit 2fb5621

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

swift/extractor/infra/file/BUILD.bazel

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@ genrule(
1818
# see if https://cplusplus.github.io/LWG/issue3657 is fixed with the current compiler or not
1919
# if fixed, PathHash.h.workaround will not compile
2020
cmd = "\n".join([
21-
"if $(CC) -c -x c++ -std=c++17 -Wno-pragma-once-outside-header \\",
21+
"if clang -c -x c++ -std=c++17 -Wno-pragma-once-outside-header \\",
2222
" $(rootpath PathHash.h.workaround) -o /dev/null &> /dev/null; then",
2323
" cp $(rootpath PathHash.h.workaround) $@",
2424
"else",
2525
" cp $(rootpath PathHash.h.fixed) $@",
2626
"fi",
2727
]),
28-
toolchains = ["@bazel_tools//tools/cpp:current_cc_host_toolchain"],
2928
)

0 commit comments

Comments
 (0)