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

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

Issue 2311843002: GN Templates: Move common_inherited_config to the template. (Closed)
Patch Set: Added comment for rtc_common_inherited_config. 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 171
172 # Global public configuration that should be applied to all WebRTC targets. You
173 # normally shouldn't need to include this in your target as it's automatically
174 # included when using the rtc_* templates. It set the defines, include paths and
175 # compilation warnings that should be propagated to dependents of the targets
176 # depending on the target having this config.
177 rtc_common_inherited_config = webrtc_root + ":common_inherited_config"
178
172 # Common configs to remove or add in all rtc targets. 179 # Common configs to remove or add in all rtc targets.
173 rtc_remove_configs = [] 180 rtc_remove_configs = []
174 rtc_add_configs = [ rtc_common_config ] 181 rtc_add_configs = [ rtc_common_config ]
175 182
176 if (!is_debug) { 183 if (!is_debug) {
177 rtc_remove_configs += [ "//build/config/compiler:default_optimization" ] 184 rtc_remove_configs += [ "//build/config/compiler:default_optimization" ]
178 rtc_add_configs += [ "//build/config/compiler:optimize_max" ] 185 rtc_add_configs += [ "//build/config/compiler:optimize_max" ]
179 } 186 }
180 187
181 set_defaults("rtc_test") { 188 set_defaults("rtc_test") {
(...skipping 15 matching lines...) Expand all
197 configs = rtc_add_configs 204 configs = rtc_add_configs
198 suppressed_configs = [] 205 suppressed_configs = []
199 } 206 }
200 207
201 template("rtc_test") { 208 template("rtc_test") {
202 test(target_name) { 209 test(target_name) {
203 forward_variables_from(invoker, 210 forward_variables_from(invoker,
204 "*", 211 "*",
205 [ 212 [
206 "configs", 213 "configs",
214 "public_configs",
207 "suppressed_configs", 215 "suppressed_configs",
208 ]) 216 ])
209 configs += invoker.configs 217 configs += invoker.configs
210 configs -= rtc_remove_configs 218 configs -= rtc_remove_configs
211 configs -= invoker.suppressed_configs 219 configs -= invoker.suppressed_configs
220 public_configs = [ rtc_common_inherited_config ]
221 if (defined(invoker.public_configs)) {
222 public_configs += invoker.public_configs
223 }
212 } 224 }
213 } 225 }
214 226
215 template("rtc_source_set") { 227 template("rtc_source_set") {
216 source_set(target_name) { 228 source_set(target_name) {
217 forward_variables_from(invoker, 229 forward_variables_from(invoker,
218 "*", 230 "*",
219 [ 231 [
220 "configs", 232 "configs",
233 "public_configs",
221 "suppressed_configs", 234 "suppressed_configs",
222 ]) 235 ])
223 configs += invoker.configs 236 configs += invoker.configs
224 configs -= rtc_remove_configs 237 configs -= rtc_remove_configs
225 configs -= invoker.suppressed_configs 238 configs -= invoker.suppressed_configs
239 public_configs = [ rtc_common_inherited_config ]
240 if (defined(invoker.public_configs)) {
241 public_configs += invoker.public_configs
242 }
226 } 243 }
227 } 244 }
228 245
229 template("rtc_executable") { 246 template("rtc_executable") {
230 executable(target_name) { 247 executable(target_name) {
231 forward_variables_from(invoker, 248 forward_variables_from(invoker,
232 "*", 249 "*",
233 [ 250 [
234 "deps", 251 "deps",
235 "configs", 252 "configs",
253 "public_configs",
236 "suppressed_configs", 254 "suppressed_configs",
237 ]) 255 ])
238 configs += invoker.configs 256 configs += invoker.configs
239 configs -= rtc_remove_configs 257 configs -= rtc_remove_configs
240 configs -= invoker.suppressed_configs 258 configs -= invoker.suppressed_configs
241 deps = [ 259 deps = [
242 "//build/config/sanitizers:deps", 260 "//build/config/sanitizers:deps",
243 ] 261 ]
244 deps += invoker.deps 262 deps += invoker.deps
263 public_configs = [ rtc_common_inherited_config ]
264 if (defined(invoker.public_configs)) {
265 public_configs += invoker.public_configs
266 }
245 } 267 }
246 } 268 }
247 269
248 template("rtc_static_library") { 270 template("rtc_static_library") {
249 static_library(target_name) { 271 static_library(target_name) {
250 forward_variables_from(invoker, 272 forward_variables_from(invoker,
251 "*", 273 "*",
252 [ 274 [
253 "configs", 275 "configs",
276 "public_configs",
254 "suppressed_configs", 277 "suppressed_configs",
255 ]) 278 ])
256 configs += invoker.configs 279 configs += invoker.configs
257 configs -= rtc_remove_configs 280 configs -= rtc_remove_configs
258 configs -= invoker.suppressed_configs 281 configs -= invoker.suppressed_configs
282 public_configs = [ rtc_common_inherited_config ]
283 if (defined(invoker.public_configs)) {
284 public_configs += invoker.public_configs
285 }
259 } 286 }
260 } 287 }
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