Skip to content

Commit

Permalink
Fix tests that call the compiler directly on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Snape committed Oct 22, 2019
1 parent d7826d0 commit f5803f9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions common/test/drake_assert_test_compile_variants.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ find . # Get some debugging output.
capture_cc_env="$1"
drake_assert_test_compile_cc="$2"

# TODO(jamiesnape): Determine this information from Bazel.
if [[ "$(uname -s)" == Darwin ]]; then
export DEVELOPER_DIR="$(xcode-select --print-path)"
export SDKROOT="$(xcrun --show-sdk-path)"
fi

# Make sure we know what C++ compiler to use.
source "$capture_cc_env"
[[ ! -z "$BAZEL_CC" ]]
Expand Down
6 changes: 6 additions & 0 deletions tools/cc_toolchain/print_host_settings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
# This should only be invoked via Bazel.
set -eux

# TODO(jamiesnape): Determine this information from Bazel.
if [[ "$(uname -s)" == Darwin ]]; then
export DEVELOPER_DIR="$(xcode-select --print-path)"
export SDKROOT="$(xcrun --show-sdk-path)"
fi

capture_cc_env="$1"
source "$capture_cc_env"

Expand Down

0 comments on commit f5803f9

Please sign in to comment.