Skip to content

Commit

Permalink
lm3s6965evb_qemu: Fix clang build
Browse files Browse the repository at this point in the history
Silences an unsupported warning in the lm3s6965evb_qemu clang build, and
then restores the build step to the tryjob so the clang ARM build is run
in CI/CQ again.

Fixes: pwbug/321
Change-Id: I858cff9d4aabf2bfa16d79a9e37dbda15c9763ed
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/94582
Commit-Queue: Auto-Submit <[email protected]>
Reviewed-by: Ewout van Bekkum <[email protected]>
Pigweed-Auto-Submit: Armando Montanez <[email protected]>
  • Loading branch information
armandomontanez authored and CQ Bot Account committed May 14, 2022
1 parent 3feef6a commit 72b7e34
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
3 changes: 1 addition & 2 deletions pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ def gn_full_qemu_check(ctx: PresubmitContext):
build.ninja(
ctx.output_dir,
*_at_all_optimization_levels('qemu_gcc'),
# TODO(pwbug/321) Re-enable clang.
# *_at_all_optimization_levels('qemu_clang'),
*_at_all_optimization_levels('qemu_clang'),
)


Expand Down
6 changes: 6 additions & 0 deletions targets/lm3s6965evb_qemu/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ generate_toolchains("target_toolchains") {
toolchains = pw_target_toolchain_lm3s6965evb_qemu_list
}

# TODO(b/232587313): This config is only used in the clang build for this
# target, see target_toolchains.gni or the associated bug for more details.
config("disable_lock_annotations") {
cflags = [ "-Wno-thread-safety-analysis" ]
}

if (current_toolchain != default_toolchain) {
pw_source_set("pre_init") {
public_deps = [
Expand Down
8 changes: 8 additions & 0 deletions targets/lm3s6965evb_qemu/target_toolchains.gni
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ _clang_target_default_configs = [
"$dir_pw_build:clang_thread_safety_warnings",
"$dir_pw_build:extra_strict_warnings",
"$dir_pw_toolchain/arm_clang:enable_float_printf",

# TODO(b/232587313): Disable lock annotations for this target because the
# clang toolchain currently relies on the standard library headers provided by
# arm-none-eabi-gcc, and thus do not have thread safety lock annotations on
# things like std::lock_guard. Thread safety checks will not work until
# the clang-based ARM toolchain uses a C++ standard library that has these
# annotations set up.
"$dir_pigweed/targets/lm3s6965evb_qemu:disable_lock_annotations",
]

pw_target_toolchain_lm3s6965evb_qemu = {
Expand Down

0 comments on commit 72b7e34

Please sign in to comment.