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

Conversation

robinlinden
Copy link

Fixes #17794

I was looking at writing a test for this, but not sure how you'd like me to go about that. Hard-code a gcc, e.g. gcc-11, or search the $PATH for a gcc-<version>?

@github-actions github-actions bot added team-Rules-CPP Issues for C++ rules awaiting-review PR is awaiting review from an assigned reviewer labels Nov 28, 2023
Copy link
Collaborator

@fmeum fmeum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking this on! Just a few drive-by comments, this will have to be reviewed by a team member.

You can run bazel run //src/test/tools/bzlmod:update_default_lock_file and commit the result to address the CI failures.

tools/cpp/unix_cc_configure.bzl Outdated Show resolved Hide resolved
tools/cpp/unix_cc_configure.bzl Outdated Show resolved Hide resolved
tools/cpp/unix_cc_configure.bzl Outdated Show resolved Hide resolved
@robinlinden robinlinden force-pushed the detect-more-gcc-variations branch 2 times, most recently from fe56c07 to de64050 Compare November 29, 2023 18:42
@robinlinden
Copy link
Author

Thanks for taking this on! Just a few drive-by comments, this will have to be reviewed by a team member.

You can run bazel run //src/test/tools/bzlmod:update_default_lock_file and commit the result to address the CI failures.

Thank you for the initial gcc-marking, as well as having a look and explaining the lock-file updating! I had a look at a few random passing PRs and didn't see any lock-file updates, so I figured I just had the worst of luck. The drive-by comments are very helpful. :)

tools/cpp/unix_cc_configure.bzl Outdated Show resolved Hide resolved
MODULE.bazel.lock Outdated Show resolved Hide resolved
@comius comius added awaiting-user-response Awaiting a response from the author and removed awaiting-review PR is awaiting review from an assigned reviewer labels Dec 28, 2023
Previously only gcc-binaries named exactly `gcc` were marked as `gcc`,
with the others being marked as `compiler`.

Fixes bazelbuild#17794
@robinlinden robinlinden force-pushed the detect-more-gcc-variations branch from de64050 to 650d26b Compare December 28, 2023 14:18
@robinlinden
Copy link
Author

@comius I can't update labels here, but this is awaiting-review again.

@comius comius added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-user-response Awaiting a response from the author labels Feb 5, 2024
@copybara-service copybara-service bot closed this in 8877183 Feb 6, 2024
@github-actions github-actions bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Feb 6, 2024
@fmeum
Copy link
Collaborator

fmeum commented Feb 6, 2024

@bazel-io fork 7.1.0

@robinlinden robinlinden deleted the detect-more-gcc-variations branch February 6, 2024 09:53
iancha1992 added a commit to iancha1992/bazel that referenced this pull request Feb 6, 2024
Fixes bazelbuild#17794

I was looking at writing a test for this, but not sure how you'd like me to go about that. Hard-code a gcc, e.g. `gcc-11`, or search the `$PATH` for a `gcc-<version>`?

Closes bazelbuild#20350.

PiperOrigin-RevId: 604543138
Change-Id: I71ebbac77e4e32ebc5d99ec4a81415727af12cbc
github-merge-queue bot pushed a commit that referenced this pull request Feb 8, 2024
…toolchain (#21224)

Fixes #17794

I was looking at writing a test for this, but not sure how you'd like me
to go about that. Hard-code a gcc, e.g. `gcc-11`, or search the `$PATH`
for a `gcc-<version>`?
    
Closes #20350.

Commit
8877183
    
PiperOrigin-RevId: 604543138
Change-Id: I71ebbac77e4e32ebc5d99ec4a81415727af12cbc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Rules-CPP Issues for C++ rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@bazel_tools//tools/cpp:compiler:gcc detection does not handle gcc-10
4 participants