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

Unified 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, 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/yasm/BUILD.gn
diff --git a/third_party/yasm/BUILD.gn b/third_party/yasm/BUILD.gn
index fcb779ac82b04ba7c2e85a75b4e869f746b9bddc..b301a10b8b0b4679cf58520bd156abcac1c439f7 100644
--- a/third_party/yasm/BUILD.gn
+++ b/third_party/yasm/BUILD.gn
@@ -135,6 +135,20 @@ if (current_toolchain == host_toolchain) {
]
}
+ config("re2c_warnings") {
+ # re2c is missing CLOSEVOP from one switch.
+ if (is_clang) {
+ cflags = [
+ # re2c is missing CLOSEVOP from one switch.
+ "-Wno-switch",
+
+ # re2c contains many static functions in headers (because it's
+ # a C library predating C99.)
+ "-Wno-unused-function",
+ ]
+ }
+ }
+
executable("re2c") {
sources = [
"source/patched-yasm/tools/re2c/actions.c",
@@ -148,30 +162,26 @@ if (current_toolchain == host_toolchain) {
"source/patched-yasm/tools/re2c/translate.c",
]
- config("re2c_warnings") {
- # re2c is missing CLOSEVOP from one switch.
- if (is_clang) {
- cflags = [
- # re2c is missing CLOSEVOP from one switch.
- "-Wno-switch",
-
- # re2c contains many static functions in headers (because it's
- # a C library predating C99.)
- "-Wno-unused-function",
- ]
- }
- }
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
+ ":re2c_warnings",
":yasm_config",
"//build/config/compiler:no_chromium_code",
- ":re2c_warnings",
]
deps = [
"//build/config/sanitizers:deps",
]
}
+ config("yasm_warnings") {
+ if (is_clang) {
+ cflags = [
+ # reg3264type in x86expr.c is unused.
+ "-Wno-unused-local-typedef",
+ ]
+ }
+ }
+
executable("yasm") {
sources = [
"source/patched-yasm/frontends/yasm/yasm-options.c",
@@ -258,20 +268,11 @@ if (current_toolchain == host_toolchain) {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
":yasm_config",
+ ":yasm_warnings",
"//build/config/compiler:no_chromium_code",
"//build/config/compiler:no_incompatible_pointer_warnings",
]
- config("yasm_warnings") {
- if (is_clang) {
- cflags = [
- # reg3264type in x86expr.c is unused.
- "-Wno-unused-local-typedef",
- ]
- }
- }
- configs += [ ":yasm_warnings" ]
-
# Yasm generates a bunch of .c files which its source file #include.
# Add the |target_gen_dir| into the include path so it can find them.
# Ideally, these generated .c files would be placed into a separate

Powered by Google App Engine
This is Rietveld 408576698