diff --git a/BUILD.gn b/BUILD.gn index b0d9468124..5d61bc18ff 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -216,6 +216,8 @@ template("dawn_static_and_shared_library") { static_library("${libname}_static") { output_name = libname + complete_static_lib = dawn_complete_static_libs + # Copy all variables except "configs", which has a default value forward_variables_from(invoker, "*", [ "configs" ]) if (defined(invoker.configs)) { diff --git a/scripts/dawn_features.gni b/scripts/dawn_features.gni index 031cdb1739..d86f2189cb 100644 --- a/scripts/dawn_features.gni +++ b/scripts/dawn_features.gni @@ -16,6 +16,11 @@ declare_args() { # Enable Dawn's ASSERTs even in release builds dawn_always_assert = false + # Should the Dawn static libraries be fully linked vs. GN's default of + # treating them as source sets. This is useful for people using Dawn + # standalone to produce static libraries to use in their projects. + dawn_complete_static_libs = false + # Enables the compilation of Dawn's D3D12 backend dawn_enable_d3d12 = is_win