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

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

Issue 2300413002: GN Templates: Move common_config to the template. (Closed)
Patch Set: Add TODOs + tracking bugs. 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 ############################################################################### 154 ###############################################################################
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.
165 # You normally shouldn't need to # include this in your target as it's
166 # automatically included when using the rtc_* templates.
167 # It sets defines, include paths and compilation warnings accordingly,
168 # both for WebRTC stand-alone builds and for the scenario when WebRTC
169 # native code is built as part of Chromium.
170 rtc_common_config = webrtc_root + ":common_config"
171
164 # Common configs to remove or add in all rtc targets. 172 # Common configs to remove or add in all rtc targets.
165 rtc_remove_configs = [] 173 rtc_remove_configs = []
166 rtc_add_configs = [] 174 rtc_add_configs = [ rtc_common_config ]
167 175
168 set_defaults("rtc_test") { 176 set_defaults("rtc_test") {
169 configs = [] 177 configs = rtc_add_configs
170 suppressed_configs = [] 178 suppressed_configs = []
171 } 179 }
172 180
173 set_defaults("rtc_source_set") { 181 set_defaults("rtc_source_set") {
174 configs = [] 182 configs = rtc_add_configs
175 suppressed_configs = [] 183 suppressed_configs = []
176 } 184 }
177 185
178 set_defaults("rtc_executable") { 186 set_defaults("rtc_executable") {
179 configs = [] 187 configs = rtc_add_configs
180 suppressed_configs = [] 188 suppressed_configs = []
181 } 189 }
182 190
183 set_defaults("rtc_static_library") { 191 set_defaults("rtc_static_library") {
184 configs = [] 192 configs = rtc_add_configs
185 suppressed_configs = [] 193 suppressed_configs = []
186 } 194 }
187 195
188 template("rtc_test") { 196 template("rtc_test") {
189 test(target_name) { 197 test(target_name) {
190 forward_variables_from(invoker, 198 forward_variables_from(invoker,
191 "*", 199 "*",
192 [ 200 [
193 "configs", 201 "configs",
194 "suppressed_configs", 202 "suppressed_configs",
195 ]) 203 ])
196 configs += invoker.configs 204 configs += invoker.configs
197 configs += rtc_add_configs
198 configs -= rtc_remove_configs 205 configs -= rtc_remove_configs
199 configs -= invoker.suppressed_configs 206 configs -= invoker.suppressed_configs
200 } 207 }
201 } 208 }
202 209
203 template("rtc_source_set") { 210 template("rtc_source_set") {
204 source_set(target_name) { 211 source_set(target_name) {
205 forward_variables_from(invoker, 212 forward_variables_from(invoker,
206 "*", 213 "*",
207 [ 214 [
208 "configs", 215 "configs",
209 "suppressed_configs", 216 "suppressed_configs",
210 ]) 217 ])
211 configs += invoker.configs 218 configs += invoker.configs
212 configs += rtc_add_configs
213 configs -= rtc_remove_configs 219 configs -= rtc_remove_configs
214 configs -= invoker.suppressed_configs 220 configs -= invoker.suppressed_configs
215 } 221 }
216 } 222 }
217 223
218 template("rtc_executable") { 224 template("rtc_executable") {
219 executable(target_name) { 225 executable(target_name) {
220 forward_variables_from(invoker, 226 forward_variables_from(invoker,
221 "*", 227 "*",
222 [ 228 [
223 "deps", 229 "deps",
224 "configs", 230 "configs",
225 "suppressed_configs", 231 "suppressed_configs",
226 ]) 232 ])
227 configs += invoker.configs 233 configs += invoker.configs
228 configs += rtc_add_configs
229 configs -= rtc_remove_configs 234 configs -= rtc_remove_configs
230 configs -= invoker.suppressed_configs 235 configs -= invoker.suppressed_configs
231 deps = [ 236 deps = [
232 "//build/config/sanitizers:deps", 237 "//build/config/sanitizers:deps",
233 ] 238 ]
234 deps += invoker.deps 239 deps += invoker.deps
235 } 240 }
236 } 241 }
237 242
238 template("rtc_static_library") { 243 template("rtc_static_library") {
239 static_library(target_name) { 244 static_library(target_name) {
240 forward_variables_from(invoker, 245 forward_variables_from(invoker,
241 "*", 246 "*",
242 [ 247 [
243 "configs", 248 "configs",
244 "suppressed_configs", 249 "suppressed_configs",
245 ]) 250 ])
246 configs += invoker.configs 251 configs += invoker.configs
247 configs += rtc_add_configs
248 configs -= rtc_remove_configs 252 configs -= rtc_remove_configs
249 configs -= invoker.suppressed_configs 253 configs -= invoker.suppressed_configs
250 } 254 }
251 } 255 }
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