Skip to content

Commit

Permalink
Fix rust settings when building with clang.
Browse files Browse the repository at this point in the history
The recent update to rules_rust 0.54.1 changed the location
of these config settings, but these flags were missed
because presubmit checks don't use clang.

I verified that these flags are still necessary.

Change-Id: Ibe960934696b5ed2bc2f58b61aba5f8acb612c3c
  • Loading branch information
bmclarnon committed Jan 17, 2025
1 parent aa6f028 commit 18929a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ build:ubsan --linkopt=-fsanitize-link-c++-runtime
build:ubsan --action_env UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1
test:ubsan --test_tag_filters=-noubsan

# rules_rust 0.48 doesn't work with rust's experimental lld linking and clang
# rules_rust 0.54.1 doesn't work with rust's experimental lld linking and clang
# (https://blog.rust-lang.org/2024/05/17/enabling-rust-lld-on-linux.html).
build:asan --@rules_rust//:extra_rustc_flag=-Zlinker-features=-lld --@rules_rust//:extra_exec_rustc_flag=-Zlinker-features=-lld
build:tsan --@rules_rust//:extra_rustc_flag=-Zlinker-features=-lld --@rules_rust//:extra_exec_rustc_flag=-Zlinker-features=-lld
build:ubsan --@rules_rust//:extra_rustc_flag=-Zlinker-features=-lld --@rules_rust//:extra_exec_rustc_flag=-Zlinker-features=-lld
build:asan --@rules_rust//rust/settings:extra_rustc_flag=-Zlinker-features=-lld --@rules_rust//rust/settings:extra_exec_rustc_flag=-Zlinker-features=-lld
build:tsan --@rules_rust//rust/settings:extra_rustc_flag=-Zlinker-features=-lld --@rules_rust//rust/settings:extra_exec_rustc_flag=-Zlinker-features=-lld
build:ubsan --@rules_rust//rust/settings:extra_rustc_flag=-Zlinker-features=-lld --@rules_rust//rust/settings:extra_exec_rustc_flag=-Zlinker-features=-lld

# Settings for remote build execution.
build:cfc-remote --experimental_allow_tags_propagation
Expand Down

0 comments on commit 18929a0

Please sign in to comment.