Skip to content

Prefix execroot-relative file arguments with pwd - #4067

Merged
illicitonion merged 1 commit into
bazelbuild:mainfrom
martin4861:pwd-prefix-positional-libs
Jun 10, 2026
Merged

Prefix execroot-relative file arguments with pwd#4067
illicitonion merged 1 commit into
bazelbuild:mainfrom
martin4861:pwd-prefix-positional-libs

Conversation

@martin4861

@martin4861 martin4861 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Prefix execroot-relative bare positional file args with pwd in cargo build scripts. This is already done for -L, -isystem, --sysroot, etc but not for bare positional arguments like bazel-out/bin/compiler-rt/libclang_rt.builtins.static.a.

This problem arised when compiling aws-lc-sys with hermetic-llvm, see hermeticbuild/hermetic-llvm#405

A minimal working example to reproduce is created in https://github.com/martin4861/mwe-bootstrapped-rust-clang_rt.builtins.static:

clang: error: no such file or directory:
'bazel-out/darwin_arm64-fastbuild-ST-bdec89fd5d65/bin/external/llvm++llvm_source+compiler-rt/clang_rt.builtins.static_/libclang_rt.builtins.static.a'

@illicitonion illicitonion left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, thanks!

@illicitonion
illicitonion added this pull request to the merge queue Jun 10, 2026
Merged via the queue into bazelbuild:main with commit 34ea934 Jun 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants