Commit 6a285c4f authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

win: Pass /nologo to ml / ml64 instead of filtering out logo in wrapper.

We still need the wrapper to set the env and to filter out ' Assembling: foo',
but less wrapper is probably better.

No intended behavior change.

Bug: none
Change-Id: Id8c165294cc3cf0ba7fc74f86a6a8fb9f8bfa042
Reviewed-on: https://chromium-review.googlesource.com/c/1303883Reviewed-by: default avatarScott Graham <scottmg@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603533}
parent d481ab54
......@@ -208,12 +208,12 @@ template("msvc_toolchain") {
tool("asm") {
if (toolchain_args.current_cpu == "x64") {
ml = "ml64.exe"
ml = "ml64.exe /nologo"
} else if (toolchain_args.current_cpu == "arm64") {
prefix = rebase_path("$clang_base_path/bin", root_build_dir)
ml = "${goma_prefix}${prefix}/${clang_cl} --target=arm64-windows"
} else {
ml = "ml.exe"
ml = "ml.exe /nologo"
}
command = "$python_path $tool_wrapper_path asm-wrapper $env $ml {{defines}} {{include_dirs}} {{asmflags}} "
if (toolchain_args.current_cpu == "arm64") {
......
......@@ -169,20 +169,15 @@ class WinTool(object):
"""Filter logo banner from invocations of asm.exe."""
env = self._GetEnv(arch)
if sys.platform == 'win32':
# Windows ARM64 uses clang-cl as assembler which has '/' as path
# separator, convert it to '\\' when running on Windows.
args = list(args) # *args is a tuple by default, which is read-only
args[0] = args[0].replace('/', '\\')
# Windows ARM64 uses clang-cl as assembler which has '/' as path
# separator, convert it to '\\' when running on Windows.
args = list(args) # *args is a tuple by default, which is read-only
args[0] = args[0].replace('/', '\\')
popen = subprocess.Popen(args, shell=True, env=env,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
out, _ = popen.communicate()
for line in out.splitlines():
# Split to avoid triggering license checks:
if (not line.startswith('Copy' + 'right (C' +
') Microsoft Corporation') and
not line.startswith('Microsoft (R) Macro Assembler') and
not line.startswith(' Assembling: ') and
line):
if not line.startswith(' Assembling: '):
print line
return popen.returncode
......
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