Index: build/toolchain/win/BUILD.gn |
diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn |
index 13d7ae2075a26591e9d332167283aae286608f6a..fedac068989ceae43ef0bf835b046d2096ac32c6 100644 |
--- a/build/toolchain/win/BUILD.gn |
+++ b/build/toolchain/win/BUILD.gn |
@@ -112,9 +112,14 @@ template("msvc_toolchain") { |
} |
tool("asm") { |
- # TODO(brettw): "/safeseh" assembler argument is hardcoded here. Extract |
- # assembler flags to a variable like cflags. crbug.com/418613 |
- command = "$python_path gyp-win-tool asm-wrapper $env ml.exe {{defines}} {{include_dirs}} {{asmflags}} /safeseh /c /Fo {{output}} {{source}}" |
+ if (invoker.current_cpu == "x64") { |
+ ml = "ml64.exe" |
+ x64 = "-D_ML64_X64" |
+ } else { |
+ ml = "ml.exe" |
+ x64 = "" |
+ } |
+ command = "$python_path gyp-win-tool asm-wrapper $env $ml $x64 {{defines}} {{include_dirs}} {{asmflags}} /c /Fo {{output}} {{source}}" |
description = "ASM {{output}}" |
outputs = [ |
"{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.obj", |