diff options
| author | Brian Osman <brianosman@google.com> | 2022-04-12 17:16:16 -0400 |
|---|---|---|
| committer | Charles Giessen <46324611+charles-lunarg@users.noreply.github.com> | 2022-04-14 09:36:46 -0600 |
| commit | fa288188b574d9eee31cd52c5432780b6a46a412 (patch) | |
| tree | 8b47e30e1d6a9f75830daa92a1c7b9689b843ffb | |
| parent | 576ce7a50864f83c848337cca413892cf85f00b2 (diff) | |
| download | usermoji-fa288188b574d9eee31cd52c5432780b6a46a412.tar.xz | |
Guard chromium-specific configs in BUILD.gn
Skia is going to start using these GN files, but does not have chromium's //build. To get them to build, guard those references using `build_with_chromium`. A similar mechanism (with the same argument) is used throughout other third party dependencies.
| -rw-r--r-- | BUILD.gn | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import("//build_overrides/build.gni") import("//build_overrides/vulkan_tools.gni") # Vulkan-tools isn't ported to Fuchsia yet. @@ -20,7 +21,7 @@ import("//build_overrides/vulkan_tools.gni") assert(!is_fuchsia) vulkan_undefine_configs = [] -if (is_win) { +if (is_win && build_with_chromium) { vulkan_undefine_configs += [ "//build/config/win:nominmax", "//build/config/win:unicode", @@ -69,8 +70,10 @@ if (!is_android) { if (is_win) { sources += [ "icd/VkICD_mock_icd.def" ] } - 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" ] + } } action("vulkan_gen_icd_json_file") { |
