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

Unified Diff: build/toolchain/gcc_toolchain.gni

Issue 1417423007: Put GN object files in subdir based on the label. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/mac/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/gcc_toolchain.gni
diff --git a/build/toolchain/gcc_toolchain.gni b/build/toolchain/gcc_toolchain.gni
index d6a9002ea9df3d2f982e0d76392d39b4d1ee5102..eb343a1e49c376b62b1d16cb022b34c740c39292 100644
--- a/build/toolchain/gcc_toolchain.gni
+++ b/build/toolchain/gcc_toolchain.gni
@@ -174,13 +174,16 @@ template("gcc_toolchain") {
lib_switch = "-l"
lib_dir_switch = "-L"
+ # Object files go in this directory.
+ object_subdir = "{{target_out_dir}}/{{label_name}}"
+
tool("cc") {
depfile = "{{output}}.d"
command = "$cc -MMD -MF $depfile ${rebuild_string}{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}"
depsformat = "gcc"
description = "CC {{output}}"
outputs = [
- "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o",
+ "$object_subdir/{{source_name_part}}.o",
]
}
@@ -190,7 +193,7 @@ template("gcc_toolchain") {
depsformat = "gcc"
description = "CXX {{output}}"
outputs = [
- "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o",
+ "$object_subdir/{{source_name_part}}.o",
]
}
@@ -201,7 +204,7 @@ template("gcc_toolchain") {
depsformat = "gcc"
description = "ASM {{output}}"
outputs = [
- "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o",
+ "$object_subdir/{{source_name_part}}.o",
]
}
« no previous file with comments | « no previous file | build/toolchain/mac/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698