Index: gni/v8.gni |
diff --git a/gni/v8.gni b/gni/v8.gni |
index d2b4da825e630887619d6e84757b3f51b1fb60dd..8dc9a25d4266ded65afd5a81823507b0211feeed 100644 |
--- a/gni/v8.gni |
+++ b/gni/v8.gni |
@@ -87,11 +87,20 @@ if (is_posix && v8_enable_backtrace) { |
# All templates should be kept in sync. |
template("v8_source_set") { |
- source_set(target_name) { |
- forward_variables_from(invoker, "*", [ "configs" ]) |
- configs += invoker.configs |
- configs -= v8_remove_configs |
- configs += v8_add_configs |
+ if (defined(v8_static_library) && v8_static_library) { |
+ static_library(target_name) { |
+ forward_variables_from(invoker, "*", [ "configs" ]) |
+ configs += invoker.configs |
+ configs -= v8_remove_configs |
+ configs += v8_add_configs |
+ } |
+ } else { |
+ source_set(target_name) { |
+ forward_variables_from(invoker, "*", [ "configs" ]) |
+ configs += invoker.configs |
+ configs -= v8_remove_configs |
+ configs += v8_add_configs |
+ } |
} |
} |