OLD | NEW |
1 # Copyright 2016 the V8 project authors. All rights reserved. | 1 # Copyright 2016 the V8 project authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/sanitizers/sanitizers.gni") | 5 import("//build/config/sanitizers/sanitizers.gni") |
6 import("//build/config/v8_target_cpu.gni") | 6 import("//build/config/v8_target_cpu.gni") |
7 import("//build_overrides/v8.gni") | 7 import("//build_overrides/v8.gni") |
8 | 8 |
9 declare_args() { | 9 declare_args() { |
10 # Indicate if valgrind was fetched as a custom deps to make it available on | 10 # Indicate if valgrind was fetched as a custom deps to make it available on |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 } | 80 } |
81 } | 81 } |
82 | 82 |
83 if (is_posix && v8_enable_backtrace) { | 83 if (is_posix && v8_enable_backtrace) { |
84 v8_remove_configs += [ "//build/config/gcc:symbol_visibility_hidden" ] | 84 v8_remove_configs += [ "//build/config/gcc:symbol_visibility_hidden" ] |
85 v8_add_configs += [ "//build/config/gcc:symbol_visibility_default" ] | 85 v8_add_configs += [ "//build/config/gcc:symbol_visibility_default" ] |
86 } | 86 } |
87 | 87 |
88 # All templates should be kept in sync. | 88 # All templates should be kept in sync. |
89 template("v8_source_set") { | 89 template("v8_source_set") { |
90 source_set(target_name) { | 90 if (defined(v8_static_library) && v8_static_library) { |
91 forward_variables_from(invoker, "*", [ "configs" ]) | 91 static_library(target_name) { |
92 configs += invoker.configs | 92 forward_variables_from(invoker, "*", [ "configs" ]) |
93 configs -= v8_remove_configs | 93 configs += invoker.configs |
94 configs += v8_add_configs | 94 configs -= v8_remove_configs |
| 95 configs += v8_add_configs |
| 96 } |
| 97 } else { |
| 98 source_set(target_name) { |
| 99 forward_variables_from(invoker, "*", [ "configs" ]) |
| 100 configs += invoker.configs |
| 101 configs -= v8_remove_configs |
| 102 configs += v8_add_configs |
| 103 } |
95 } | 104 } |
96 } | 105 } |
97 | 106 |
98 template("v8_executable") { | 107 template("v8_executable") { |
99 executable(target_name) { | 108 executable(target_name) { |
100 forward_variables_from(invoker, | 109 forward_variables_from(invoker, |
101 "*", | 110 "*", |
102 [ | 111 [ |
103 "configs", | 112 "configs", |
104 "remove_configs", | 113 "remove_configs", |
(...skipping 12 matching lines...) Expand all Loading... |
117 } | 126 } |
118 | 127 |
119 template("v8_component") { | 128 template("v8_component") { |
120 component(target_name) { | 129 component(target_name) { |
121 forward_variables_from(invoker, "*", [ "configs" ]) | 130 forward_variables_from(invoker, "*", [ "configs" ]) |
122 configs += invoker.configs | 131 configs += invoker.configs |
123 configs -= v8_remove_configs | 132 configs -= v8_remove_configs |
124 configs += v8_add_configs | 133 configs += v8_add_configs |
125 } | 134 } |
126 } | 135 } |
OLD | NEW |