Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3350)

Unified Diff: build/toolchain/gcc_ar_wrapper.py

Issue 2209763002: Revert of Enable whitelist generation for all builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/toolchain/gcc_compile_wrapper.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/gcc_ar_wrapper.py
diff --git a/build/toolchain/gcc_ar_wrapper.py b/build/toolchain/gcc_ar_wrapper.py
index de53df09e97582ab424b38c966beff262e8fd849..a8f319030761342125f5b0e0c775e1a8611ea4f4 100755
--- a/build/toolchain/gcc_ar_wrapper.py
+++ b/build/toolchain/gcc_ar_wrapper.py
@@ -16,7 +16,20 @@
import subprocess
import sys
-import wrapper_utils
+
+# When running on a Windows host and using a toolchain whose tools are
+# actually wrapper scripts (i.e. .bat files on Windows) rather than binary
+# executables, the "command" to run has to be prefixed with this magic.
+# The GN toolchain definitions take care of that for when GN/Ninja is
+# running the tool directly. When that command is passed in to this
+# script, it appears as a unitary string but needs to be split up so that
+# just 'cmd' is the actual command given to Python's subprocess module.
+BAT_PREFIX = 'cmd /c call '
+
+def CommandToRun(command):
+ if command[0].startswith(BAT_PREFIX):
+ command = command[0].split(None, 3) + command[1:]
+ return command
def main():
@@ -31,19 +44,11 @@
metavar='ARCHIVE')
parser.add_argument('--plugin',
help='Load plugin')
- parser.add_argument('--resource-whitelist',
- help='Merge all resource whitelists into a single file.',
- metavar='PATH')
parser.add_argument('operation',
help='Operation on the archive')
parser.add_argument('inputs', nargs='+',
help='Input files')
args = parser.parse_args()
-
- if args.resource_whitelist:
- whitelist_candidates = wrapper_utils.ResolveRspLinks(args.inputs)
- wrapper_utils.CombineResourceWhitelists(
- whitelist_candidates, args.resource_whitelist)
command = [args.ar, args.operation]
if args.plugin is not None:
@@ -59,7 +64,7 @@
raise
# Now just run the ar command.
- return subprocess.call(wrapper_utils.CommandToRun(command))
+ return subprocess.call(CommandToRun(command))
if __name__ == "__main__":
« no previous file with comments | « no previous file | build/toolchain/gcc_compile_wrapper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698