Skip to content

Remove absolutify#973

Merged
illicitonion merged 1 commit intobazelbuild:mainfrom
illicitonion:remove-absolutify
Oct 14, 2021
Merged

Remove absolutify#973
illicitonion merged 1 commit intobazelbuild:mainfrom
illicitonion:remove-absolutify

Conversation

@illicitonion
Copy link
Copy Markdown
Collaborator

This is the built-in behaviour of Path::join.

This is the built-in behaviour of `Path::join`.
Copy link
Copy Markdown
Collaborator

@dfreese dfreese left a comment

Choose a reason for hiding this comment

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

I'll be the first to admit that behavior is slightly surprising at first glance.

@illicitonion illicitonion merged commit 4efa71d into bazelbuild:main Oct 14, 2021
@illicitonion illicitonion deleted the remove-absolutify branch October 14, 2021 10:15
scentini added a commit that referenced this pull request Oct 15, 2021
#973 changed the type of `cc_path` from `std::ffi::OsString` to `std::path::PathBuf`, which breaks builds that specify `SYSROOT`. As `std::path::PathBuf::push(x)` replaces the current path when x is absolute, the [`cc_path.push(&exec_root.join(sysroot_path));`](https://github.com/bazelbuild/rules_rust/blob/89d207bae700497dc37b2a66a8f338b88c83ddaa/cargo/cargo_build_script_runner/bin.rs#L95) line ends up dropping everything that was previously added to `cc_path`.

This PR fixes the issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants