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

-resource-dir flag for clang should be absolute #2925

Merged
merged 1 commit into from
Sep 24, 2021

Conversation

chancila
Copy link
Contributor

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?

A clang based toolchain controlling compiler built-in directory via --resource-dir will not work in tandem with cgo enabled go toolchain.

This PR adds --resource-dir to the set of cgo compiler flags the builder transforms to absolute paths.

Which issues(s) does this PR fix?

Fixes #2924

Other notes for review

@google-cla
Copy link

google-cla bot commented Jul 16, 2021

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Jul 16, 2021
@robfig
Copy link
Contributor

robfig commented Sep 23, 2021

Hi, thanks for your contribution! Is it possible to provide a test which fails without this behavior and passes now?

@chancila
Copy link
Contributor Author

chancila commented Sep 24, 2021

a full blown integration style test would be quite difficult because it would require creating a valid cc_toolchain, I tried to look if there's any other test in the project validating the current behavior (there isn't really) so I didn't write a test

Copy link
Contributor

@steeve steeve left a comment

Choose a reason for hiding this comment

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

@robfig giving you the final say on this of course

@robfig robfig merged commit 7d62d4c into bazel-contrib:master Sep 24, 2021
@robfig
Copy link
Contributor

robfig commented Sep 24, 2021

Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--resource-dir needs to be made absolute, similar to other path flags like --sysroot or -I for cgo
3 participants