From 03f64292ad554697026316a55ace9022eff4b3b0 Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Sat, 12 Jan 2019 17:26:49 +0000 Subject: [PATCH] dawn_features.gni: add an option to complete static libraries This is useful for people using Dawn's standalone build to compile static libraries to use in other projects. Without this static libraries will act as source sets as is GN's default. BUG=dawn:85 Change-Id: I4d99cbbbe67c73f226717651cb12ed0a172409b2 Reviewed-on: https://dawn-review.googlesource.com/c/3840 Reviewed-by: Stephen White Reviewed-by: Kai Ninomiya Commit-Queue: Corentin Wallez --- BUILD.gn | 2 ++ scripts/dawn_features.gni | 5 +++++ 2 files changed, 7 insertions(+) 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