OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 # The yasm build process creates a slew of small C subprograms that | 5 # The yasm build process creates a slew of small C subprograms that |
6 # dynamically generate files at various point in the build process. This makes | 6 # dynamically generate files at various point in the build process. This makes |
7 # the build integration moderately complex. | 7 # the build integration moderately complex. |
8 # | 8 # |
9 # There are three classes of dynamically generated files: | 9 # There are three classes of dynamically generated files: |
10 # 1) C source files that should be included in the build (eg., lc3bid.c) | 10 # 1) C source files that should be included in the build (eg., lc3bid.c) |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 sources = [ | 50 sources = [ |
51 "source/patched-yasm/tools/genmacro/genmacro.c", | 51 "source/patched-yasm/tools/genmacro/genmacro.c", |
52 ] | 52 ] |
53 configs -= [ "//build/config/compiler:chromium_code" ] | 53 configs -= [ "//build/config/compiler:chromium_code" ] |
54 configs += [ | 54 configs += [ |
55 ":yasm_config", | 55 ":yasm_config", |
56 "//build/config/compiler:no_chromium_code", | 56 "//build/config/compiler:no_chromium_code", |
57 ] | 57 ] |
58 deps = [ | 58 deps = [ |
59 "//build/config/sanitizers:deps", | 59 "//build/config/sanitizers:deps", |
| 60 |
| 61 # Default manifest on Windows (a no-op elsewhere). |
| 62 "//build/win:default_exe_manifest", |
60 ] | 63 ] |
61 } | 64 } |
62 | 65 |
63 executable("genmodule") { | 66 executable("genmodule") { |
64 sources = [ | 67 sources = [ |
65 "source/patched-yasm/libyasm/genmodule.c", | 68 "source/patched-yasm/libyasm/genmodule.c", |
66 ] | 69 ] |
67 configs -= [ "//build/config/compiler:chromium_code" ] | 70 configs -= [ "//build/config/compiler:chromium_code" ] |
68 configs += [ | 71 configs += [ |
69 ":yasm_config", | 72 ":yasm_config", |
70 "//build/config/compiler:no_chromium_code", | 73 "//build/config/compiler:no_chromium_code", |
71 ] | 74 ] |
72 deps = [ | 75 deps = [ |
73 "//build/config/sanitizers:deps", | 76 "//build/config/sanitizers:deps", |
| 77 |
| 78 # Default manifest on Windows (a no-op elsewhere). |
| 79 "//build/win:default_exe_manifest", |
74 ] | 80 ] |
75 } | 81 } |
76 | 82 |
77 executable("genperf") { | 83 executable("genperf") { |
78 sources = [ | 84 sources = [ |
79 "source/patched-yasm/tools/genperf/genperf.c", | 85 "source/patched-yasm/tools/genperf/genperf.c", |
80 "source/patched-yasm/tools/genperf/perfect.c", | 86 "source/patched-yasm/tools/genperf/perfect.c", |
81 ] | 87 ] |
82 | 88 |
83 configs -= [ "//build/config/compiler:chromium_code" ] | 89 configs -= [ "//build/config/compiler:chromium_code" ] |
84 configs += [ | 90 configs += [ |
85 ":yasm_config", | 91 ":yasm_config", |
86 "//build/config/compiler:no_chromium_code", | 92 "//build/config/compiler:no_chromium_code", |
87 ] | 93 ] |
88 | 94 |
89 deps = [ | 95 deps = [ |
90 ":yasm_utils", | 96 ":yasm_utils", |
91 "//build/config/sanitizers:deps", | 97 "//build/config/sanitizers:deps", |
| 98 |
| 99 # Default manifest on Windows (a no-op elsewhere). |
| 100 "//build/win:default_exe_manifest", |
92 ] | 101 ] |
93 } | 102 } |
94 | 103 |
95 # Used by both yasm and genperf binaries. | 104 # Used by both yasm and genperf binaries. |
96 source_set("yasm_utils") { | 105 source_set("yasm_utils") { |
97 sources = [ | 106 sources = [ |
98 "source/patched-yasm/libyasm/phash.c", | 107 "source/patched-yasm/libyasm/phash.c", |
99 "source/patched-yasm/libyasm/xmalloc.c", | 108 "source/patched-yasm/libyasm/xmalloc.c", |
100 "source/patched-yasm/libyasm/xstrdup.c", | 109 "source/patched-yasm/libyasm/xstrdup.c", |
101 ] | 110 ] |
102 | 111 |
103 configs -= [ "//build/config/compiler:chromium_code" ] | 112 configs -= [ "//build/config/compiler:chromium_code" ] |
104 configs += [ | 113 configs += [ |
105 ":yasm_config", | 114 ":yasm_config", |
106 "//build/config/compiler:no_chromium_code", | 115 "//build/config/compiler:no_chromium_code", |
107 ] | 116 ] |
108 } | 117 } |
109 | 118 |
110 executable("genstring") { | 119 executable("genstring") { |
111 sources = [ | 120 sources = [ |
112 "source/patched-yasm/genstring.c", | 121 "source/patched-yasm/genstring.c", |
113 ] | 122 ] |
114 configs -= [ "//build/config/compiler:chromium_code" ] | 123 configs -= [ "//build/config/compiler:chromium_code" ] |
115 configs += [ | 124 configs += [ |
116 ":yasm_config", | 125 ":yasm_config", |
117 "//build/config/compiler:no_chromium_code", | 126 "//build/config/compiler:no_chromium_code", |
118 ] | 127 ] |
119 deps = [ | 128 deps = [ |
120 "//build/config/sanitizers:deps", | 129 "//build/config/sanitizers:deps", |
| 130 |
| 131 # Default manifest on Windows (a no-op elsewhere). |
| 132 "//build/win:default_exe_manifest", |
121 ] | 133 ] |
122 } | 134 } |
123 | 135 |
124 executable("genversion") { | 136 executable("genversion") { |
125 sources = [ | 137 sources = [ |
126 "source/patched-yasm/modules/preprocs/nasm/genversion.c", | 138 "source/patched-yasm/modules/preprocs/nasm/genversion.c", |
127 ] | 139 ] |
128 configs -= [ "//build/config/compiler:chromium_code" ] | 140 configs -= [ "//build/config/compiler:chromium_code" ] |
129 configs += [ | 141 configs += [ |
130 ":yasm_config", | 142 ":yasm_config", |
131 "//build/config/compiler:no_chromium_code", | 143 "//build/config/compiler:no_chromium_code", |
132 ] | 144 ] |
133 deps = [ | 145 deps = [ |
134 "//build/config/sanitizers:deps", | 146 "//build/config/sanitizers:deps", |
| 147 |
| 148 # Default manifest on Windows (a no-op elsewhere). |
| 149 "//build/win:default_exe_manifest", |
135 ] | 150 ] |
136 } | 151 } |
137 | 152 |
138 config("re2c_warnings") { | 153 config("re2c_warnings") { |
139 # re2c is missing CLOSEVOP from one switch. | 154 # re2c is missing CLOSEVOP from one switch. |
140 if (is_clang) { | 155 if (is_clang) { |
141 cflags = [ | 156 cflags = [ |
142 # re2c is missing CLOSEVOP from one switch. | 157 # re2c is missing CLOSEVOP from one switch. |
143 "-Wno-switch", | 158 "-Wno-switch", |
144 | 159 |
(...skipping 21 matching lines...) Expand all Loading... |
166 configs += [ | 181 configs += [ |
167 ":yasm_config", | 182 ":yasm_config", |
168 "//build/config/compiler:no_chromium_code", | 183 "//build/config/compiler:no_chromium_code", |
169 | 184 |
170 # Must be after no_chromium_code for warning flags to be ordered | 185 # Must be after no_chromium_code for warning flags to be ordered |
171 # correctly. | 186 # correctly. |
172 ":re2c_warnings", | 187 ":re2c_warnings", |
173 ] | 188 ] |
174 deps = [ | 189 deps = [ |
175 "//build/config/sanitizers:deps", | 190 "//build/config/sanitizers:deps", |
| 191 |
| 192 # Default manifest on Windows (a no-op elsewhere). |
| 193 "//build/win:default_exe_manifest", |
176 ] | 194 ] |
177 } | 195 } |
178 | 196 |
179 config("yasm_warnings") { | 197 config("yasm_warnings") { |
180 if (is_clang) { | 198 if (is_clang) { |
181 cflags = [ | 199 cflags = [ |
182 # reg3264type in x86expr.c is unused. | 200 # reg3264type in x86expr.c is unused. |
183 "-Wno-unused-local-typedef", | 201 "-Wno-unused-local-typedef", |
184 ] | 202 ] |
185 } | 203 } |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 ":compile_nasm_version", | 319 ":compile_nasm_version", |
302 ":compile_re2c", | 320 ":compile_re2c", |
303 ":compile_re2c_lc3b", | 321 ":compile_re2c_lc3b", |
304 ":compile_win64_gas", | 322 ":compile_win64_gas", |
305 ":compile_win64_nasm", | 323 ":compile_win64_nasm", |
306 ":generate_license", | 324 ":generate_license", |
307 ":generate_module", | 325 ":generate_module", |
308 ":generate_version", | 326 ":generate_version", |
309 ":yasm_utils", | 327 ":yasm_utils", |
310 "//build/config/sanitizers:deps", | 328 "//build/config/sanitizers:deps", |
| 329 |
| 330 # Default manifest on Windows (a no-op elsewhere). |
| 331 "//build/win:default_exe_manifest", |
311 ] | 332 ] |
312 } | 333 } |
313 | 334 |
314 compiled_action_foreach("compile_gperf") { | 335 compiled_action_foreach("compile_gperf") { |
315 tool = ":genperf" | 336 tool = ":genperf" |
316 sources = [ | 337 sources = [ |
317 "source/patched-yasm/modules/arch/x86/x86cpu.gperf", | 338 "source/patched-yasm/modules/arch/x86/x86cpu.gperf", |
318 "source/patched-yasm/modules/arch/x86/x86regtmod.gperf", | 339 "source/patched-yasm/modules/arch/x86/x86regtmod.gperf", |
319 ] | 340 ] |
320 | 341 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 | 525 |
505 # Output eventually #included by source/patched-yasm/frontends/yasm/x86id.c | 526 # Output eventually #included by source/patched-yasm/frontends/yasm/x86id.c |
506 outputs = [ | 527 outputs = [ |
507 "$yasm_gen_include_dir/x86insns.c", | 528 "$yasm_gen_include_dir/x86insns.c", |
508 "$yasm_gen_include_dir/x86insn_gas.gperf", | 529 "$yasm_gen_include_dir/x86insn_gas.gperf", |
509 "$yasm_gen_include_dir/x86insn_nasm.gperf", | 530 "$yasm_gen_include_dir/x86insn_nasm.gperf", |
510 ] | 531 ] |
511 args = [ rebase_path(yasm_gen_include_dir, root_build_dir) ] | 532 args = [ rebase_path(yasm_gen_include_dir, root_build_dir) ] |
512 } | 533 } |
513 } | 534 } |
OLD | NEW |