Skip to content

Commit

Permalink
Fix BUILD.gn for Chromium build. (google#741)
Browse files Browse the repository at this point in the history
Sorry about the noise. GN configs can be surprising.
  • Loading branch information
digit-google authored and dneto0 committed Jun 25, 2019
1 parent ab08017 commit c4ba097
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions BUILD.gn
Expand Up @@ -23,13 +23,6 @@ config("shaderc_util_public") {
include_dirs = [ "libshaderc_util/include" ]
}

config("shaderc_internal_config") {
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
}
}

source_set("shaderc_util_sources") {
sources = [
"libshaderc_util/include/libshaderc_util/counting_includer.h",
Expand Down Expand Up @@ -61,7 +54,10 @@ source_set("shaderc_util_sources") {
"${spirv_tools_dir}:spvtools",
]

configs += [ ":shaderc_internal_config" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
}
}

config("shaderc_public") {
Expand Down Expand Up @@ -96,7 +92,10 @@ component("libshaderc") {
"${glslang_dir}:glslang_sources",
]

configs += [ ":shaderc_internal_config" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
}
}

config("shaderc_spvc_public") {
Expand Down Expand Up @@ -134,5 +133,8 @@ component("libshaderc_spvc") {
"${spirv_cross_dir}:spirv_cross_full_for_fuzzers",
]

configs += [ ":shaderc_internal_config" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
}
}

0 comments on commit c4ba097

Please sign in to comment.