Index: build/toolchain/win/BUILD.gn |
diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn |
index 4b550525712c3aadc8510cc327c76da692e387e5..b80ef1d0ec3687cb17b94b9f9659ebe0f2c34885 100644 |
--- a/build/toolchain/win/BUILD.gn |
+++ b/build/toolchain/win/BUILD.gn |
@@ -84,6 +84,9 @@ template("msvc_toolchain") { |
lib_switch = "" |
lib_dir_switch = "/LIBPATH:" |
+ # Object files go in this directory. |
+ object_subdir = "{{target_out_dir}}/{{label_name}}" |
+ |
tool("cc") { |
rspfile = "{{output}}.rsp" |
precompiled_header_type = "msvc" |
@@ -92,7 +95,7 @@ template("msvc_toolchain") { |
depsformat = "msvc" |
description = "CC {{output}}" |
outputs = [ |
- "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.obj", |
+ "$object_subdir/{{source_name_part}}.obj", |
] |
rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}}" |
} |
@@ -107,7 +110,7 @@ template("msvc_toolchain") { |
depsformat = "msvc" |
description = "CXX {{output}}" |
outputs = [ |
- "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.obj", |
+ "$object_subdir/{{source_name_part}}.obj", |
] |
rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}}" |
} |
@@ -115,7 +118,7 @@ template("msvc_toolchain") { |
tool("rc") { |
command = "$python_path gyp-win-tool rc-wrapper $env rc.exe {{defines}} {{include_dirs}} /fo{{output}} {{source}}" |
outputs = [ |
- "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.res", |
+ "$object_subdir/{{source_name_part}}.res", |
] |
description = "RC {{output}}" |
} |
@@ -129,7 +132,7 @@ template("msvc_toolchain") { |
command = "$python_path gyp-win-tool asm-wrapper $env $ml {{defines}} {{include_dirs}} {{asmflags}} /c /Fo{{output}} {{source}}" |
description = "ASM {{output}}" |
outputs = [ |
- "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.obj", |
+ "$object_subdir/{{source_name_part}}.obj", |
] |
} |