diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-16 03:04:16 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-16 03:04:16 +0000 |
commit | 1d157e56702e604f6c824c3e5409297044d041a3 (patch) | |
tree | 58b33c465822f9a58480b7bcb671679c0c657c97 /tools | |
parent | 80cb23c815b9d685a1011be47f7f81b2a318a503 (diff) | |
download | chromium_src-1d157e56702e604f6c824c3e5409297044d041a3.zip chromium_src-1d157e56702e604f6c824c3e5409297044d041a3.tar.gz chromium_src-1d157e56702e604f6c824c3e5409297044d041a3.tar.bz2 |
clang plugin: Fix tests when running on OS X 10.9
On 10.9, trunk clang defaults to targeting libc++. Clang expects to bundle
the libc++ headers to be able to use libc++, but we don't currently do this.
Instead, tell the plugin tests to use libstdc++ and pass a sysroot flag.
(The blink oilpan plugin doesn't use and standard library includes, so it
doesn't need this change at the moment.)
BUG=none
TEST=tools/clang/plugins/tests/test.sh third_party/llvm-build/Release+Asserts
NOTRY=true
Review URL: https://codereview.chromium.org/239753005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264089 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/clang/plugins/tests/test.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/clang/plugins/tests/test.sh b/tools/clang/plugins/tests/test.sh index 1a27f48..cbb32e7 100755 --- a/tools/clang/plugins/tests/test.sh +++ b/tools/clang/plugins/tests/test.sh @@ -27,6 +27,11 @@ do_testcase() { if [ -e "${3}" ]; then flags="$(cat "${3}")" fi + + if [ "$(uname -s)" = "Darwin" ]; then + flags="${flags} -isysroot $(xcrun --show-sdk-path) -stdlib=libstdc++" + fi + local output="$("${CLANG_DIR}"/bin/clang -c -Wno-c++11-extensions \ -Xclang -load -Xclang "${CLANG_DIR}"/lib/libFindBadConstructs.${LIB} \ -Xclang -add-plugin -Xclang find-bad-constructs ${flags} ${1} 2>&1)" |