diff options
author | Cassidy Burden <cburden@google.com> | 2016-08-09 15:22:36 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-08-09 18:14:16 -0700 |
commit | 6e57349f7dbbde843bd3d14cb09b09ed75446aa1 (patch) | |
tree | 9f33a8689e59a71fffc04cae3149574a43fbed5a /binary_search_tool | |
parent | a5e3929d7a155606bc541777fc84e4989389e13c (diff) | |
download | toolchain-utils-6e57349f7dbbde843bd3d14cb09b09ed75446aa1.tar.gz |
binary search tool: Fix edge cases in compiler wrapper
Fix compiler wrapper edge cases that exist with the NDK and
ChromeOS build systems. For ChromeOS we support the -MMD flag when
caching dependency files. For NDK we support calls to compiler that
give no output file (these calls are meant to check compiler
capabilities).
TEST=NDK bisection and ChromeOS population
Change-Id: Ic23bc7876e9844eacb106d49082e0509ea1ee31b
Reviewed-on: https://chrome-internal-review.googlesource.com/273985
Commit-Ready: Cassidy Burden <cburden@google.com>
Tested-by: Cassidy Burden <cburden@google.com>
Reviewed-by: Caroline Tice <cmtice@google.com>
Diffstat (limited to 'binary_search_tool')
-rw-r--r-- | binary_search_tool/bisect_driver.py | 2 | ||||
-rwxr-xr-x | binary_search_tool/compiler_wrapper.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/binary_search_tool/bisect_driver.py b/binary_search_tool/bisect_driver.py index c151f7b9..d57b6bab 100644 --- a/binary_search_tool/bisect_driver.py +++ b/binary_search_tool/bisect_driver.py @@ -148,7 +148,7 @@ def get_dep_path(execargs): Absolute path of dependency file path from execution args (-o argument). If no dependency being outputted then return empty string. """ - if '-MD' not in execargs: + if '-MD' not in execargs and '-MMD' not in execargs: return '' # If -MF given this is the path of the dependency file. Otherwise the diff --git a/binary_search_tool/compiler_wrapper.py b/binary_search_tool/compiler_wrapper.py index 35a28e6a..3d6403a2 100755 --- a/binary_search_tool/compiler_wrapper.py +++ b/binary_search_tool/compiler_wrapper.py @@ -45,7 +45,7 @@ def Main(_): execargs = [WRAPPED] + sys.argv[1:] - if BISECT_STAGE not in bisect_driver.VALID_MODES: + if BISECT_STAGE not in bisect_driver.VALID_MODES or '-o' not in execargs: os.execv(WRAPPED, [WRAPPED] + sys.argv[1:]) # Handle @file argument syntax with compiler |