-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Add optional tool_path_origin to Tools in C++ crosstool #10967
Conversation
This change adds an optional field to the C++ crosstool proto that allows configuring the origin tool_path is relative to. For now, the origin can be one of the following: - CROSSTOOL_PACKAGE: If tool_path is a relative path, it's assumed to be relative to the package of the crosstool top. - FILESYSTEM_ROOT: tool_path is an absolute path. This is checked by Bazel. - WORKSPACE_ROOT: tool_path must be a relative path and is assumed to be relative to the exec-root of the workspace (similar to other executables). Updates bazelbuild#8438
92ffa4c
to
87377fb
Compare
@oquenchil , can you take a look? |
Hi Yannic, this #7746 (comment) from scentini and a few comments above from hlopko is the last context that I can find about how we should go about this problem and how to allow tools from other repositories. I don't exactly see how your change is going in that direction but perhaps it's because this is all kind of new to me and I might be missing something. Could you please clarify? |
Not original author but this bite me hard so I'll try to explain: Currently, For example, say, you have a cc_toolchain_config rule People currently solve this with one-liner wrapper scripts located under
From what I can see, the patch adds a new attribute Edit: further clarify. |
The use-case I had in mind is primarily to remove the need for the checked-in wrapper-scripts @Riatre mentioned. It's also a step in the right direction for tools from external repositories (although, AFAICT, a bit more work is needed there). The way CC toolchains/crosstools currently work is that, for relative paths, It's still neccessary to provide all tool artifacts a second time to Usage example:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This change adds an optional field to the C++ crosstool proto that
allows configuring the origin tool_path is relative to.
For now, the origin can be one of the following:
be relative to the package of the crosstool top.
Bazel.
be relative to the exec-root of the workspace (similar to other
executables).
Updates #8438