Skip to content

Commit

Permalink
update presubmit
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryang20718 committed Sep 9, 2024
1 parent 14d9485 commit e49556a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
9 changes: 9 additions & 0 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,11 @@ tasks:
- "//..."
# The with_global_alloc directory is a repository on its own tested in the 'Build via cc_common.link using a global allocator' task.
- "-//with_global_alloc/..."
coverage_targets:
- "--"
- "//..."
# The with_global_alloc directory is a repository on its own tested in the 'Build via cc_common.link using a global allocator' task.
- "-//with_global_alloc/..."
build_flags:
- "--@rules_rust//rust/settings:experimental_use_cc_common_link=True"
test_flags:
Expand All @@ -551,6 +556,8 @@ tasks:
- "//..."
test_targets:
- "//..."
coverage_targets:
- "//..."
build_flags:
- "--@rules_rust//rust/settings:experimental_use_cc_common_link=True"
- "--@rules_rust//rust/settings:experimental_use_global_allocator=True"
Expand All @@ -565,6 +572,8 @@ tasks:
- "//..."
test_targets:
- "//..."
# coverage_targets: # TODO: fix https://github.com/bazelbuild/rules_rust/issues/2838
# - "//..."
build_flags:
- "--@rules_rust//rust/toolchain/channel=nightly"
- "--@rules_rust//rust/settings:experimental_use_cc_common_link=True"
Expand Down
5 changes: 2 additions & 3 deletions rust/private/rustc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1434,9 +1434,8 @@ def rustc_compile_action(

coverage_link_flags = []
if include_coverage:
# coverage fails due to gcc lacking a few linker args
# this fixes missing symbols and links against the c lib
coverage_link_flags = ["-u", "__llvm_profile_runtime", "-lc"]
# fixes missing symbols coverage fails due to gcc lacking a few linker args
coverage_link_flags = ["-u", "__llvm_profile_runtime"]

cc_common.link(
actions = ctx.actions,
Expand Down

0 comments on commit e49556a

Please sign in to comment.