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

Add build setting to enable specifying other tool locations #4

Merged

Conversation

timothytrippel
Copy link
Collaborator

On some systems, the CC toolchain discovered by bazel uses a different path for the linker than where the linker (that is specified by the -fuse-ld= flag) actually lives on the system.

The issue stems from rules_rust deciding to pass -fuse-ld=lld a link arg, rather than just using what was detected by the CC toolchain. This results in the linker not being found, as reported by
lowRISC/opentitan#12448

This is a workaround that enables telling rules_rust where other linker directories might be on your system. It is used by passing --@rules_rust//:extra_rustc_toolchain_dirs=/path/to/somewhere/else to bazel ... invocations.

On some systems, the CC toolchain discovered by bazel uses a different
path for the linker than where the linker (that is specified by the
`-fuse-ld=` flag) actually lives on the system.

The issue stems from rules_rust deciding to pass `-fuse-ld=lld` a link arg,
rather than just using what was detected by the CC toolchain. This results
in the linker not being found, as reported by
lowRISC/opentitan#12448

This is a workaround that enables telling rules_rust where other linker
directories might be on your system. It is used by passing
`--@rules_rust//:extra_rustc_toolchain_dirs=/path/to/somewhere/else` to
`bazel ...` invocations.

Signed-off-by: Tim Trippel <[email protected]>
@timothytrippel timothytrippel self-assigned this Sep 14, 2023
@timothytrippel timothytrippel merged commit 5ac689a into lowRISC:rebase-20230822 Sep 16, 2023
1 check passed
@timothytrippel timothytrippel deleted the patch-rules-rust branch September 16, 2023 00:10
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.

1 participant