Commit b2293631 authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

win: Only quote /I and -imsvc flags if needed.

After https://chromium-review.googlesource.com/1075947, quoting is
never needed with the hermetic msvc toolchain, so let's make the
build command a tiny bit nicer in that scenario.

Bug: 640000,439949
Change-Id: I22e3470057b43fb6a5df3f675bc95a7d84dce9c9
Reviewed-on: https://chromium-review.googlesource.com/1101557
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarScott Graham <scottmg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567401}
parent d3572283
......@@ -247,8 +247,10 @@ def main():
except ValueError:
pass
include_I = ' '.join(['"/I' + i + '"' for i in include])
include_imsvc = ' '.join(['"-imsvc' + i + '"' for i in include])
def q(s): # Quote s if it contains spaces or other weird characters.
return s if re.match(r'^[a-zA-Z0-9._/\\:-]*$', s) else '"' + s + '"'
include_I = ' '.join([q('/I' + i) for i in include])
include_imsvc = ' '.join([q('-imsvc' + i) for i in include])
if (environment_block_name != ''):
env_block = _FormatAsEnvironmentBlock(env)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment