Make dawn_use_x11 = use_x11 when building inside Chromium The variable use_x11 in Chromium takes into account more thinks like whether we are building in LaCrOS mode and more. If we don't do this, compilation of Chromium fails when Dawn tries to include X11/Xlib.h Bug: chromium:976495 Change-Id: I8b4e865f50f60235466c8ba72683927124aa094e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30220 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/scripts/dawn_features.gni b/scripts/dawn_features.gni index 6f4f01e..09db849 100644 --- a/scripts/dawn_features.gni +++ b/scripts/dawn_features.gni
@@ -16,6 +16,14 @@ if (build_with_chromium) { import("//build/config/sanitizers/sanitizers.gni") + import("//build/config/ui.gni") + + dawn_use_x11 = use_x11 +} else { + declare_args() { + # Whether Dawn should enable X11 support. + dawn_use_x11 = is_linux && !is_chromeos + } } declare_args() { @@ -66,9 +74,6 @@ dawn_enable_error_injection = is_debug || (build_with_chromium && use_fuzzing_engine) - # Whether Dawn should enable X11 support. - dawn_use_x11 = is_linux && !is_chromeos - # Enable support WGSL for shaders. # Turned off for Skia, because Tint is currently not part of its DEPS. dawn_enable_wgsl = !defined(is_skia_standalone)