llvm.org GIT mirror llvm / 88c3ba1
[gn] Use label_name rather than target_output_name for objects Multiple targets in the same output directory can use the same target_output_name. The typical example of that is having a shared and a static library of the same, e.g. libc++.so and libc++.a. When that's the case, the object files produced for each target are going to conflict. Using the label_name avoids this conflict since labels are guaranteed to be unique within a single BUILD.gn file which corresponds to a single output directory. Differential Revision: https://reviews.llvm.org/D60329 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359494 91177308-0d34-0410-b5e6-96231b3b80d8 Petr Hosek 5 months ago
1 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
1818 depsformat = "gcc"
1919 description = "CC {{output}}"
2020 outputs = [
21 "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o",
21 "{{source_out_dir}}/{{label_name}}.{{source_name_part}}.o"
2222 ]
2323 }
2424
2828 depsformat = "gcc"
2929 description = "CXX {{output}}"
3030 outputs = [
31 "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o",
31 "{{source_out_dir}}/{{label_name}}.{{source_name_part}}.o"
3232 ]
3333 }
3434
3838 depsformat = "gcc"
3939 description = "ASM {{output}}"
4040 outputs = [
41 "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o",
41 "{{source_out_dir}}/{{label_name}}.{{source_name_part}}.o"
4242 ]
4343 }
4444
226226 depsformat = "msvc"
227227 description = "CC {{output}}"
228228 outputs = [
229 "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj",
229 "{{source_out_dir}}/{{label_name}}.{{source_name_part}}.obj",
230230 ]
231231 }
232232
235235 depsformat = "msvc"
236236 description = "CXX {{output}}"
237237 outputs = [
238 "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj",
238 "{{source_out_dir}}/{{label_name}}.{{source_name_part}}.obj",
239239 ]
240240 }
241241