diff --git a/build_overrides/dawn.gni b/build_overrides/dawn.gni index 0378ec1f97..08b2238c65 100644 --- a/build_overrides/dawn.gni +++ b/build_overrides/dawn.gni @@ -20,6 +20,9 @@ # MUST be unset in other projects (will default to false). dawn_standalone = true +# True if Dawn can access build/, testing/ and other Chrome folders. +dawn_has_build = true + # Defaults for these are set again in dawn_overrides_with_defaults.gni so that # users of Dawn don't have to set dirs if they happen to use the same as Dawn. diff --git a/scripts/dawn_component.gni b/scripts/dawn_component.gni index 2a85c78585..cf18a21d03 100644 --- a/scripts/dawn_component.gni +++ b/scripts/dawn_component.gni @@ -107,7 +107,7 @@ template("dawn_component") { } static_library("${libname}_static") { - output_name = libname + output_name = libname + "_static" complete_static_lib = dawn_complete_static_libs diff --git a/scripts/dawn_overrides_with_defaults.gni b/scripts/dawn_overrides_with_defaults.gni index 0886e032ca..6f852c5630 100644 --- a/scripts/dawn_overrides_with_defaults.gni +++ b/scripts/dawn_overrides_with_defaults.gni @@ -24,6 +24,10 @@ if (!defined(dawn_standalone)) { dawn_standalone = false } +if (!defined(dawn_has_build)) { + dawn_has_build = true +} + if (!defined(dawn_root)) { dawn_root = get_path_info("..", "abspath") } diff --git a/src/dawn_native/BUILD.gn b/src/dawn_native/BUILD.gn index 7ab1800d23..656054eb49 100644 --- a/src/dawn_native/BUILD.gn +++ b/src/dawn_native/BUILD.gn @@ -15,14 +15,21 @@ import("../../scripts/dawn_overrides_with_defaults.gni") import("//build_overrides/build.gni") -import("//build_overrides/vulkan_validation_layers.gni") import("${dawn_root}/generator/dawn_generator.gni") import("${dawn_root}/scripts/dawn_component.gni") import("${dawn_root}/scripts/dawn_features.gni") # Import mac_min_system_version if (is_mac) { - import("//build/config/mac/mac_sdk.gni") + if (dawn_has_build) { + import("//build/config/mac/mac_sdk.gni") + } else { + mac_min_system_version = "10.11.0" + } +} + +if (dawn_enable_vulkan_validation_layers) { + import("//build_overrides/vulkan_validation_layers.gni") } # Swiftshader is an optional dependency of Dawn so we only use it if the path