diff options
author | earthdok <earthdok@chromium.org> | 2015-03-25 10:10:17 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-25 17:11:10 +0000 |
commit | 3d7df4998143363b1d13e055614217c3c4f10d8c (patch) | |
tree | 99974c69e91238f5929ebd247212de48532c329d | |
parent | c430d4b17cbb9b2cc055777c0124cdce745479da (diff) | |
download | chromium_src-3d7df4998143363b1d13e055614217c3c4f10d8c.zip chromium_src-3d7df4998143363b1d13e055614217c3c4f10d8c.tar.gz chromium_src-3d7df4998143363b1d13e055614217c3c4f10d8c.tar.bz2 |
Instrumented libraries: allow overriding CC/CXX.
BUG=none
R=glider@chromium.org
Review URL: https://codereview.chromium.org/1037763002
Cr-Commit-Position: refs/heads/master@{#322181}
-rw-r--r-- | third_party/instrumented_libraries/instrumented_libraries.gyp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/third_party/instrumented_libraries/instrumented_libraries.gyp b/third_party/instrumented_libraries/instrumented_libraries.gyp index 050ed09..ea0c659 100644 --- a/third_party/instrumented_libraries/instrumented_libraries.gyp +++ b/third_party/instrumented_libraries/instrumented_libraries.gyp @@ -6,10 +6,14 @@ 'variables': { 'verbose_libraries_build%': 0, 'instrumented_libraries_jobs%': 1, + 'instrumented_libraries_cc%': '', + 'instrumented_libraries_cxx%': '', }, 'libdir': 'lib', 'ubuntu_release': '<!(lsb_release -cs)', + 'clang_absolute_path': '<!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/bin/clang', + 'clang++_absolute_path': '<!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/bin/clang++', 'conditions': [ ['asan==1', { @@ -22,11 +26,19 @@ 'sanitizer_type': 'tsan', }], ['use_goma==1', { - 'cc': '<(gomadir)/gomacc <!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/bin/clang', - 'cxx': '<(gomadir)/gomacc <!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/bin/clang++', + 'cc': '<(gomadir)/gomacc <(_clang_absolute_path)', + 'cxx': '<(gomadir)/gomacc <(_clang++_absolute_path)', }, { - 'cc': '<!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/bin/clang', - 'cxx': '<!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/bin/clang++', + 'cc': '<(clang_absolute_path)', + 'cxx': '<(clang++_absolute_path)', + }], + # When building with a custom clang, CC/CXX must be overridden via GYP + # variables. + ['instrumented_libraries_cc!=""', { + 'cc': '<(instrumented_libraries_cc)', + }], + ['instrumented_libraries_cxx!=""', { + 'cxx': '<(instrumented_libraries_cxx)', }], ], |