Skip to content

Commit c2326cc

Browse files
gnoliyilcharles-lunarg
authored andcommitted
build: Fix Chromium-specific configs in BUILD.gn
`chromium_code` and `no_chromium_code` are GN config targets defined in the chromium repository. Non-Chromium GN builds don't have these targets and GN will fail parsing them. This change modifies Chromium-specific configs so that they are only applied on Chromium builds. Test: Vulkan-Loader builds on Fuchsia (also with other changes) Bug: https://fxbug.dev/378964821 Change-Id: I326527a33db685a404705568426d1a64cc1eac04
1 parent 59e156b commit c2326cc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

BUILD.gn

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,10 @@ if (!is_android) {
260260
frameworks = [ "CoreFoundation.framework" ]
261261
}
262262
public_deps = [ "$vulkan_headers_dir:vulkan_headers" ]
263-
configs -= [ "//build/config/compiler:chromium_code" ]
264-
configs += [ "//build/config/compiler:no_chromium_code" ]
263+
if (build_with_chromium) {
264+
configs -= [ "//build/config/compiler:chromium_code" ]
265+
configs += [ "//build/config/compiler:no_chromium_code" ]
266+
}
265267
configs += [ ":vulkan_internal_config" ]
266268
public_configs = [ ":vulkan_loader_config" ]
267269
configs -= vulkan_undefine_configs

0 commit comments

Comments
 (0)