Skip to content

Commit

Permalink
Merge pull request #11377 from jamiesnape/fix-capture-cc
Browse files Browse the repository at this point in the history
Fix //tools/cc_toolchain:capture_cc for Bazel 0.25
  • Loading branch information
jamiesnape authored May 6, 2019
2 parents fe0345c + 83be120 commit cf02601
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/test/drake_assert_test_compile_variants.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if [[ ! -e ./drake ]]; then
fi

# Confirm that it compiles successfully, whether or not assertions are enabled.
TESTING_CXXFLAGS="-std=c++14 -I . \
TESTING_CXXFLAGS="$BAZEL_CC_FLAGS -std=c++14 -I . \
-c $drake_assert_test_compile_cc \
-o /dev/null"
"$BAZEL_CC" $TESTING_CXXFLAGS
Expand Down
6 changes: 5 additions & 1 deletion tools/cc_toolchain/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ filegroup(
genrule(
name = "capture_cc",
outs = ["capture_cc.env"],
cmd = "echo \"BAZEL_CC=$(CC)\" > '$@'",
cmd = "printf \"BAZEL_CC=$(CC)\nBAZEL_CC_FLAGS=$(CC_FLAGS)\n\" > '$@'",
toolchains = [
"@bazel_tools//tools/cpp:cc_flags",
"@bazel_tools//tools/cpp:current_cc_toolchain",
],
visibility = ["//common:__pkg__"],
)

Expand Down

0 comments on commit cf02601

Please sign in to comment.