From 38ceadab022f85275653546ea68e2c16ebad6a68 Mon Sep 17 00:00:00 2001 From: Jochen Eisinger Date: Thu, 9 Feb 2017 14:28:10 +0100 Subject: [PATCH] Make sure a pure list of headers is never turned into a static library Windows won't create empty .lib files, and will subsequently fail to find the library other rules expect R=machenbach@chromium.org BUG= Change-Id: I8b848834a6957c2164f0eafc853587d39ccb6ca9 Reviewed-on: https://chromium-review.googlesource.com/440244 Reviewed-by: Michael Achenbach Commit-Queue: Jochen Eisinger Cr-Commit-Position: refs/heads/master@{#43141} --- BUILD.gn | 2 +- gni/v8.gni | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index 2d9875f2d7..1d67866d90 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -879,7 +879,7 @@ if (v8_use_external_startup_data) { # This is split out to be a non-code containing target that the Chromium browser # DLL can depend upon to get only a version string. -v8_source_set("v8_version") { +v8_header_set("v8_version") { configs = [ ":internal_config" ] sources = [ diff --git a/gni/v8.gni b/gni/v8.gni index a4a3656306..ea628e0000 100644 --- a/gni/v8.gni +++ b/gni/v8.gni @@ -112,6 +112,15 @@ template("v8_source_set") { } } +template("v8_header_set") { + source_set(target_name) { + forward_variables_from(invoker, "*", [ "configs" ]) + configs += invoker.configs + configs -= v8_remove_configs + configs += v8_add_configs + } +} + template("v8_executable") { executable(target_name) { forward_variables_from(invoker,