Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: webrtc/build/webrtc.gni

Issue 2311843002: GN Templates: Move common_inherited_config to the template. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/base/BUILD.gn ('k') | webrtc/call/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
2 # 2 #
3 # Use of this source code is governed by a BSD-style license 3 # Use of this source code is governed by a BSD-style license
4 # that can be found in the LICENSE file in the root of the source 4 # that can be found in the LICENSE file in the root of the source
5 # tree. An additional intellectual property rights grant can be found 5 # tree. An additional intellectual property rights grant can be found
6 # in the file PATENTS. All contributing project authors may 6 # in the file PATENTS. All contributing project authors may
7 # be found in the AUTHORS file in the root of the source tree. 7 # be found in the AUTHORS file in the root of the source tree.
8 8
9 import("//build/config/arm.gni") 9 import("//build/config/arm.gni")
10 import("//build/config/features.gni") 10 import("//build/config/features.gni")
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 # Templates 155 # Templates
156 # 156 #
157 157
158 # Points to //webrtc/ in webrtc stand-alone or to //third_party/webrtc/ in 158 # Points to //webrtc/ in webrtc stand-alone or to //third_party/webrtc/ in
159 # chromium. 159 # chromium.
160 # We need absolute paths for all configs in templates as they are shared in 160 # We need absolute paths for all configs in templates as they are shared in
161 # different subdirectories. 161 # different subdirectories.
162 webrtc_root = get_path_info("../", "abspath") 162 webrtc_root = get_path_info("../", "abspath")
163 163
164 # Global configuration that should be applied to all WebRTC targets. 164 # Global configuration that should be applied to all WebRTC targets.
165 # You normally shouldn't need to # include this in your target as it's 165 # You normally shouldn't need to include this in your target as it's
166 # automatically included when using the rtc_* templates. 166 # automatically included when using the rtc_* templates.
167 # It sets defines, include paths and compilation warnings accordingly, 167 # It sets defines, include paths and compilation warnings accordingly,
168 # both for WebRTC stand-alone builds and for the scenario when WebRTC 168 # both for WebRTC stand-alone builds and for the scenario when WebRTC
169 # native code is built as part of Chromium. 169 # native code is built as part of Chromium.
170 rtc_common_config = webrtc_root + ":common_config" 170 rtc_common_config = webrtc_root + ":common_config"
171 rtc_common_inherited_config = webrtc_root + ":common_inherited_config"
kjellander_webrtc 2016/09/05 12:41:31 Add a separate comment about this one: Global pub
ehmaldonado_webrtc 2016/09/05 12:49:59 Done.
171 172
172 # Common configs to remove or add in all rtc targets. 173 # Common configs to remove or add in all rtc targets.
173 rtc_remove_configs = [] 174 rtc_remove_configs = []
174 rtc_add_configs = [ rtc_common_config ] 175 rtc_add_configs = [ rtc_common_config ]
175 176
176 if (!is_debug) { 177 if (!is_debug) {
177 rtc_remove_configs += [ "//build/config/compiler:default_optimization" ] 178 rtc_remove_configs += [ "//build/config/compiler:default_optimization" ]
178 rtc_add_configs += [ "//build/config/compiler:optimize_max" ] 179 rtc_add_configs += [ "//build/config/compiler:optimize_max" ]
179 } 180 }
180 181
(...skipping 16 matching lines...) Expand all
197 configs = rtc_add_configs 198 configs = rtc_add_configs
198 suppressed_configs = [] 199 suppressed_configs = []
199 } 200 }
200 201
201 template("rtc_test") { 202 template("rtc_test") {
202 test(target_name) { 203 test(target_name) {
203 forward_variables_from(invoker, 204 forward_variables_from(invoker,
204 "*", 205 "*",
205 [ 206 [
206 "configs", 207 "configs",
208 "public_configs",
207 "suppressed_configs", 209 "suppressed_configs",
208 ]) 210 ])
209 configs += invoker.configs 211 configs += invoker.configs
210 configs -= rtc_remove_configs 212 configs -= rtc_remove_configs
211 configs -= invoker.suppressed_configs 213 configs -= invoker.suppressed_configs
214 public_configs = [ rtc_common_inherited_config ]
215 if (defined(invoker.public_configs)) {
kjellander_webrtc 2016/09/05 12:41:31 I guess this check is needed because public_config
ehmaldonado_webrtc 2016/09/05 12:49:59 Yes, the default configs is defined in BUILDCONFIG
216 public_configs += invoker.public_configs
217 }
212 } 218 }
213 } 219 }
214 220
215 template("rtc_source_set") { 221 template("rtc_source_set") {
216 source_set(target_name) { 222 source_set(target_name) {
217 forward_variables_from(invoker, 223 forward_variables_from(invoker,
218 "*", 224 "*",
219 [ 225 [
220 "configs", 226 "configs",
227 "public_configs",
221 "suppressed_configs", 228 "suppressed_configs",
222 ]) 229 ])
223 configs += invoker.configs 230 configs += invoker.configs
224 configs -= rtc_remove_configs 231 configs -= rtc_remove_configs
225 configs -= invoker.suppressed_configs 232 configs -= invoker.suppressed_configs
233 public_configs = [ rtc_common_inherited_config ]
234 if (defined(invoker.public_configs)) {
235 public_configs += invoker.public_configs
236 }
226 } 237 }
227 } 238 }
228 239
229 template("rtc_executable") { 240 template("rtc_executable") {
230 executable(target_name) { 241 executable(target_name) {
231 forward_variables_from(invoker, 242 forward_variables_from(invoker,
232 "*", 243 "*",
233 [ 244 [
234 "deps", 245 "deps",
235 "configs", 246 "configs",
247 "public_configs",
236 "suppressed_configs", 248 "suppressed_configs",
237 ]) 249 ])
238 configs += invoker.configs 250 configs += invoker.configs
239 configs -= rtc_remove_configs 251 configs -= rtc_remove_configs
240 configs -= invoker.suppressed_configs 252 configs -= invoker.suppressed_configs
241 deps = [ 253 deps = [
242 "//build/config/sanitizers:deps", 254 "//build/config/sanitizers:deps",
243 ] 255 ]
244 deps += invoker.deps 256 deps += invoker.deps
257 public_configs = [ rtc_common_inherited_config ]
258 if (defined(invoker.public_configs)) {
259 public_configs += invoker.public_configs
260 }
245 } 261 }
246 } 262 }
247 263
248 template("rtc_static_library") { 264 template("rtc_static_library") {
249 static_library(target_name) { 265 static_library(target_name) {
250 forward_variables_from(invoker, 266 forward_variables_from(invoker,
251 "*", 267 "*",
252 [ 268 [
253 "configs", 269 "configs",
270 "public_configs",
254 "suppressed_configs", 271 "suppressed_configs",
255 ]) 272 ])
256 configs += invoker.configs 273 configs += invoker.configs
257 configs -= rtc_remove_configs 274 configs -= rtc_remove_configs
258 configs -= invoker.suppressed_configs 275 configs -= invoker.suppressed_configs
276 public_configs = [ rtc_common_inherited_config ]
277 if (defined(invoker.public_configs)) {
278 public_configs += invoker.public_configs
279 }
259 } 280 }
260 } 281 }
OLDNEW
« no previous file with comments | « webrtc/base/BUILD.gn ('k') | webrtc/call/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698