Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark gcc-<version> as gcc instead of compiler in Unix CC toolchain #20350

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/test/tools/bzlmod/MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion tools/cpp/unix_cc_configure.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ def _is_clang(repository_ctx, cc):
def _is_gcc(repository_ctx, cc):
# GCC's version output uses the basename of argv[0] as the program name:
# https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/gcc.cc;h=158461167951c1b9540322fb19be6a89d6da07fc;hb=HEAD#l8728
return repository_ctx.execute([cc, "--version"]).stdout.startswith("gcc ")
cc_stdout = repository_ctx.execute([cc, "--version"]).stdout
return cc_stdout.startswith("gcc ") or cc_stdout.startswith("gcc-")

def _get_compiler_name(repository_ctx, cc):
if _is_clang(repository_ctx, cc):
Expand Down
Loading