Skip to content

Commit

Permalink
build: Fix Chromium-specific configs in BUILD.gn
Browse files Browse the repository at this point in the history
`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
  • Loading branch information
gnoliyil authored and charles-lunarg committed Feb 18, 2025
1 parent 59e156b commit c2326cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,10 @@ if (!is_android) {
frameworks = [ "CoreFoundation.framework" ]
}
public_deps = [ "$vulkan_headers_dir:vulkan_headers" ]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
}
configs += [ ":vulkan_internal_config" ]
public_configs = [ ":vulkan_loader_config" ]
configs -= vulkan_undefine_configs
Expand Down

0 comments on commit c2326cc

Please sign in to comment.