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

Resolve tools to include runfiles #437

Closed
wants to merge 9 commits into from

Conversation

jsharpe
Copy link
Member

@jsharpe jsharpe commented Nov 4, 2020

Fixes #433

@jsharpe jsharpe requested a review from oquenchil as a code owner November 4, 2020 22:34
@google-cla
Copy link

google-cla bot commented Nov 4, 2020

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@jsharpe
Copy link
Member Author

jsharpe commented Nov 4, 2020

@googlebot I signed it!

@jsharpe
Copy link
Member Author

jsharpe commented Nov 19, 2020

@oquenchil is there anything you'd like me to change to get this merged?

@jsharpe jsharpe marked this pull request as draft January 22, 2021 14:15
@jsharpe jsharpe force-pushed the tools_runfiles branch 4 times, most recently from 563c1c3 to cfb8ad7 Compare January 31, 2021 23:56
Copy link
Collaborator

@UebelAndre UebelAndre left a comment

Choose a reason for hiding this comment

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

A couple of questions/comments

@@ -18,7 +18,7 @@ make_tool(

native_tool_toolchain(
name = "built_make",
path = "make/bin/make",
path = "$(execpath :make_tool)/bin/make",
Copy link
Collaborator

Choose a reason for hiding this comment

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

seems a bit odd. I'd expect $(execpath :make_tool) to be a path to the tool and target = ":make_tool" should be sufficient. Do you think it'd be difficult to update this to not require both target and path?

Copy link
Member Author

Choose a reason for hiding this comment

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

$(execpath :make_tool) is the output from a rules_foreign_cc build which doesn't generate an executable target directly ( you have to do the dance of creating a filegroup and an executable target via a wrapper or another cc_* rule. This issue is along the lines of the same problem that #428 is looking to address too; there may be multiple tools required in the PATH but I guess in the emscripten case that this could be done by a shell wrapper that sets up the path so that binaryen is present in the context that emscripten is expecting it to be.

Also note that I'd made this observation in the tool_access.bzl file that it'd be easier if this was an executable target than a freeform path as we need to special case between absolute and relative paths.

tools/build_defs/cmake_script.bzl Show resolved Hide resolved
Copy link
Collaborator

@UebelAndre UebelAndre left a comment

Choose a reason for hiding this comment

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

One last question but I think it otherwise looks good.

tools/build_defs/framework.bzl Outdated Show resolved Hide resolved
@UebelAndre
Copy link
Collaborator

Is #490 related to this in any way?

@jsharpe
Copy link
Member Author

jsharpe commented Feb 4, 2021

Is #490 related to this in any way?

Not directly; but it'd be natural to fix up #490 after landing this.

Base automatically changed from master to main February 12, 2021 16:44
@whs-dot-hk
Copy link
Contributor

Good job, this is it... It will put an end to this repo

@UebelAndre
Copy link
Collaborator

Good job, this is it... It will put an end to this repo

Can you explain why you feel that way?

@github-actions
Copy link

This Pull Request has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. Collaborators can add an assignee to keep this open indefinitely. Thanks for your contributions to rules_foreign_cc!

@github-actions
Copy link

This PR was automatically closed because it went 30 days without a reply since it was labeled "Can Close?"

@github-actions github-actions bot closed this Oct 12, 2021
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.

The tools_deps targets don't include runfiles
3 participants