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

Side by Side Diff: third_party/yasm/BUILD.gn

Issue 1318823008: Un-nest configs in GN files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months 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 unified diff | Download patch
OLDNEW
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 configs -= [ "//build/config/compiler:chromium_code" ] 128 configs -= [ "//build/config/compiler:chromium_code" ]
129 configs += [ 129 configs += [
130 ":yasm_config", 130 ":yasm_config",
131 "//build/config/compiler:no_chromium_code", 131 "//build/config/compiler:no_chromium_code",
132 ] 132 ]
133 deps = [ 133 deps = [
134 "//build/config/sanitizers:deps", 134 "//build/config/sanitizers:deps",
135 ] 135 ]
136 } 136 }
137 137
138 config("re2c_warnings") {
139 # re2c is missing CLOSEVOP from one switch.
140 if (is_clang) {
141 cflags = [
142 # re2c is missing CLOSEVOP from one switch.
143 "-Wno-switch",
144
145 # re2c contains many static functions in headers (because it's
146 # a C library predating C99.)
147 "-Wno-unused-function",
148 ]
149 }
150 }
151
138 executable("re2c") { 152 executable("re2c") {
139 sources = [ 153 sources = [
140 "source/patched-yasm/tools/re2c/actions.c", 154 "source/patched-yasm/tools/re2c/actions.c",
141 "source/patched-yasm/tools/re2c/code.c", 155 "source/patched-yasm/tools/re2c/code.c",
142 "source/patched-yasm/tools/re2c/dfa.c", 156 "source/patched-yasm/tools/re2c/dfa.c",
143 "source/patched-yasm/tools/re2c/main.c", 157 "source/patched-yasm/tools/re2c/main.c",
144 "source/patched-yasm/tools/re2c/mbo_getopt.c", 158 "source/patched-yasm/tools/re2c/mbo_getopt.c",
145 "source/patched-yasm/tools/re2c/parser.c", 159 "source/patched-yasm/tools/re2c/parser.c",
146 "source/patched-yasm/tools/re2c/scanner.c", 160 "source/patched-yasm/tools/re2c/scanner.c",
147 "source/patched-yasm/tools/re2c/substr.c", 161 "source/patched-yasm/tools/re2c/substr.c",
148 "source/patched-yasm/tools/re2c/translate.c", 162 "source/patched-yasm/tools/re2c/translate.c",
149 ] 163 ]
150 164
151 config("re2c_warnings") {
152 # re2c is missing CLOSEVOP from one switch.
153 if (is_clang) {
154 cflags = [
155 # re2c is missing CLOSEVOP from one switch.
156 "-Wno-switch",
157
158 # re2c contains many static functions in headers (because it's
159 # a C library predating C99.)
160 "-Wno-unused-function",
161 ]
162 }
163 }
164 configs -= [ "//build/config/compiler:chromium_code" ] 165 configs -= [ "//build/config/compiler:chromium_code" ]
165 configs += [ 166 configs += [
167 ":re2c_warnings",
166 ":yasm_config", 168 ":yasm_config",
167 "//build/config/compiler:no_chromium_code", 169 "//build/config/compiler:no_chromium_code",
168 ":re2c_warnings",
169 ] 170 ]
170 deps = [ 171 deps = [
171 "//build/config/sanitizers:deps", 172 "//build/config/sanitizers:deps",
172 ] 173 ]
173 } 174 }
174 175
176 config("yasm_warnings") {
177 if (is_clang) {
178 cflags = [
179 # reg3264type in x86expr.c is unused.
180 "-Wno-unused-local-typedef",
181 ]
182 }
183 }
184
175 executable("yasm") { 185 executable("yasm") {
176 sources = [ 186 sources = [
177 "source/patched-yasm/frontends/yasm/yasm-options.c", 187 "source/patched-yasm/frontends/yasm/yasm-options.c",
178 "source/patched-yasm/frontends/yasm/yasm.c", 188 "source/patched-yasm/frontends/yasm/yasm.c",
179 "source/patched-yasm/libyasm/assocdat.c", 189 "source/patched-yasm/libyasm/assocdat.c",
180 "source/patched-yasm/libyasm/bc-align.c", 190 "source/patched-yasm/libyasm/bc-align.c",
181 "source/patched-yasm/libyasm/bc-data.c", 191 "source/patched-yasm/libyasm/bc-data.c",
182 "source/patched-yasm/libyasm/bc-incbin.c", 192 "source/patched-yasm/libyasm/bc-incbin.c",
183 "source/patched-yasm/libyasm/bc-org.c", 193 "source/patched-yasm/libyasm/bc-org.c",
184 "source/patched-yasm/libyasm/bc-reserve.c", 194 "source/patched-yasm/libyasm/bc-reserve.c",
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 # File generated by compile_re2c_lc3b 261 # File generated by compile_re2c_lc3b
252 "$target_gen_dir/lc3bid.c", 262 "$target_gen_dir/lc3bid.c",
253 263
254 # File generated by generate_module 264 # File generated by generate_module
255 "$target_gen_dir/module.c", 265 "$target_gen_dir/module.c",
256 ] 266 ]
257 267
258 configs -= [ "//build/config/compiler:chromium_code" ] 268 configs -= [ "//build/config/compiler:chromium_code" ]
259 configs += [ 269 configs += [
260 ":yasm_config", 270 ":yasm_config",
271 ":yasm_warnings",
261 "//build/config/compiler:no_chromium_code", 272 "//build/config/compiler:no_chromium_code",
262 "//build/config/compiler:no_incompatible_pointer_warnings", 273 "//build/config/compiler:no_incompatible_pointer_warnings",
263 ] 274 ]
264 275
265 config("yasm_warnings") {
266 if (is_clang) {
267 cflags = [
268 # reg3264type in x86expr.c is unused.
269 "-Wno-unused-local-typedef",
270 ]
271 }
272 }
273 configs += [ ":yasm_warnings" ]
274
275 # Yasm generates a bunch of .c files which its source file #include. 276 # Yasm generates a bunch of .c files which its source file #include.
276 # Add the |target_gen_dir| into the include path so it can find them. 277 # Add the |target_gen_dir| into the include path so it can find them.
277 # Ideally, these generated .c files would be placed into a separate 278 # Ideally, these generated .c files would be placed into a separate
278 # directory, but the gen_x86_insn.py script does not make this easy. 279 # directory, but the gen_x86_insn.py script does not make this easy.
279 include_dirs = [ yasm_gen_include_dir ] 280 include_dirs = [ yasm_gen_include_dir ]
280 281
281 if (!is_win) { 282 if (!is_win) {
282 cflags = [ 283 cflags = [
283 "-ansi", 284 "-ansi",
284 "-pedantic", 285 "-pedantic",
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 498
498 # Output eventually #included by source/patched-yasm/frontends/yasm/x86id.c 499 # Output eventually #included by source/patched-yasm/frontends/yasm/x86id.c
499 outputs = [ 500 outputs = [
500 "$yasm_gen_include_dir/x86insns.c", 501 "$yasm_gen_include_dir/x86insns.c",
501 "$yasm_gen_include_dir/x86insn_gas.gperf", 502 "$yasm_gen_include_dir/x86insn_gas.gperf",
502 "$yasm_gen_include_dir/x86insn_nasm.gperf", 503 "$yasm_gen_include_dir/x86insn_nasm.gperf",
503 ] 504 ]
504 args = [ rebase_path(yasm_gen_include_dir, root_build_dir) ] 505 args = [ rebase_path(yasm_gen_include_dir, root_build_dir) ]
505 } 506 }
506 } 507 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698