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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 "source/patched-yasm/tools/re2c/code.c", | 141 "source/patched-yasm/tools/re2c/code.c", |
142 "source/patched-yasm/tools/re2c/dfa.c", | 142 "source/patched-yasm/tools/re2c/dfa.c", |
143 "source/patched-yasm/tools/re2c/main.c", | 143 "source/patched-yasm/tools/re2c/main.c", |
144 "source/patched-yasm/tools/re2c/mbo_getopt.c", | 144 "source/patched-yasm/tools/re2c/mbo_getopt.c", |
145 "source/patched-yasm/tools/re2c/parser.c", | 145 "source/patched-yasm/tools/re2c/parser.c", |
146 "source/patched-yasm/tools/re2c/scanner.c", | 146 "source/patched-yasm/tools/re2c/scanner.c", |
147 "source/patched-yasm/tools/re2c/substr.c", | 147 "source/patched-yasm/tools/re2c/substr.c", |
148 "source/patched-yasm/tools/re2c/translate.c", | 148 "source/patched-yasm/tools/re2c/translate.c", |
149 ] | 149 ] |
150 | 150 |
| 151 config("re2c_warnings") { |
| 152 # re2c is missing CLOSEVOP from one switch. |
| 153 if (is_posix || is_clang) { |
| 154 cflags = [ "-Wno-switch" ] |
| 155 } |
| 156 } |
| 157 |
151 configs -= [ "//build/config/compiler:chromium_code" ] | 158 configs -= [ "//build/config/compiler:chromium_code" ] |
152 configs += [ | 159 configs += [ |
153 ":yasm_config", | 160 ":yasm_config", |
154 "//build/config/compiler:no_chromium_code", | 161 "//build/config/compiler:no_chromium_code", |
| 162 ":re2c_warnings", |
155 ] | 163 ] |
156 | |
157 # re2c is missing CLOSEVOP from one switch. | |
158 if (is_posix) { | |
159 cflags = [ "-Wno-switch" ] | |
160 } | |
161 deps = [ | 164 deps = [ |
162 "//build/config/sanitizers:deps", | 165 "//build/config/sanitizers:deps", |
163 ] | 166 ] |
164 } | 167 } |
165 | 168 |
166 executable("yasm") { | 169 executable("yasm") { |
167 sources = [ | 170 sources = [ |
168 "source/patched-yasm/frontends/yasm/yasm-options.c", | 171 "source/patched-yasm/frontends/yasm/yasm-options.c", |
169 "source/patched-yasm/frontends/yasm/yasm.c", | 172 "source/patched-yasm/frontends/yasm/yasm.c", |
170 "source/patched-yasm/libyasm/assocdat.c", | 173 "source/patched-yasm/libyasm/assocdat.c", |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 | 491 |
489 # Output eventually #included by source/patched-yasm/frontends/yasm/x86id.c | 492 # Output eventually #included by source/patched-yasm/frontends/yasm/x86id.c |
490 outputs = [ | 493 outputs = [ |
491 "$yasm_gen_include_dir/x86insns.c", | 494 "$yasm_gen_include_dir/x86insns.c", |
492 "$yasm_gen_include_dir/x86insn_gas.gperf", | 495 "$yasm_gen_include_dir/x86insn_gas.gperf", |
493 "$yasm_gen_include_dir/x86insn_nasm.gperf", | 496 "$yasm_gen_include_dir/x86insn_nasm.gperf", |
494 ] | 497 ] |
495 args = [ rebase_path(yasm_gen_include_dir, root_build_dir) ] | 498 args = [ rebase_path(yasm_gen_include_dir, root_build_dir) ] |
496 } | 499 } |
497 } | 500 } |
OLD | NEW |