OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 if (current_cpu == "x86") { | 5 if (current_cpu == "x86") { |
6 _yasm_flags = [ | 6 _yasm_flags = [ |
7 "-felf32", | 7 "-felf32", |
8 "-m", | 8 "-m", |
9 "x86", | 9 "x86", |
10 ] | 10 ] |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 65 |
66 # Extra defines. | 66 # Extra defines. |
67 if (defined(invoker.defines)) { | 67 if (defined(invoker.defines)) { |
68 foreach(def, invoker.defines) { | 68 foreach(def, invoker.defines) { |
69 args += [ "-D$def" ] | 69 args += [ "-D$def" ] |
70 } | 70 } |
71 } | 71 } |
72 | 72 |
73 # Output file. | 73 # Output file. |
74 outputs = [ | 74 outputs = [ |
75 "$target_out_dir/{{source_name_part}}.o", | 75 "$target_out_dir/$source_set_name/{{source_name_part}}.o", |
76 ] | 76 ] |
77 args += [ | 77 args += [ |
78 "-o", | 78 "-o", |
79 rebase_path(outputs[0], root_build_dir), | 79 rebase_path(outputs[0], root_build_dir), |
80 "{{source}}", | 80 "{{source}}", |
81 ] | 81 ] |
82 | 82 |
83 # The wrapper script run_yasm will write the depfile to the same name as | 83 # The wrapper script run_yasm will write the depfile to the same name as |
84 # the output but with .d appended (like gcc will). | 84 # the output but with .d appended (like gcc will). |
85 depfile = outputs[0] + ".d" | 85 depfile = outputs[0] + ".d" |
86 } | 86 } |
87 | 87 |
88 # Gather the .o files into a linkable thing. This doesn't actually link | 88 # Gather the .o files into a linkable thing. This doesn't actually link |
89 # anything (a source set just compiles files to link later), but will pass | 89 # anything (a source set just compiles files to link later), but will pass |
90 # the object files generated by the action up the dependency chain. | 90 # the object files generated by the action up the dependency chain. |
91 source_set(source_set_name) { | 91 source_set(source_set_name) { |
92 if (defined(invoker.visibility)) { | 92 if (defined(invoker.visibility)) { |
93 visibility = invoker.visibility | 93 visibility = invoker.visibility |
94 } | 94 } |
95 | 95 |
96 sources = get_target_outputs(":$action_name") | 96 sources = get_target_outputs(":$action_name") |
97 | 97 |
98 deps = [ | 98 deps = [ |
99 ":$action_name", | 99 ":$action_name", |
100 ] | 100 ] |
101 } | 101 } |
102 } | 102 } |
OLD | NEW |