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

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

Issue 2300413002: GN Templates: Move common_config to the template. (Closed)
Patch Set: This might be it. 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
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 rtc_common_config = webrtc_root + ":common_config"
kjellander_webrtc 2016/09/05 06:50:28 Let's document this one properly. Something like t
165
164 # Common configs to remove or add in all rtc targets. 166 # Common configs to remove or add in all rtc targets.
165 rtc_remove_configs = [] 167 rtc_remove_configs = []
166 rtc_add_configs = [] 168 rtc_add_configs = [ rtc_common_config ]
167 169
168 set_defaults("rtc_test") { 170 set_defaults("rtc_test") {
169 configs = [] 171 configs = rtc_add_configs
170 suppressed_configs = [] 172 suppressed_configs = []
171 } 173 }
172 174
173 set_defaults("rtc_source_set") { 175 set_defaults("rtc_source_set") {
174 configs = [] 176 configs = rtc_add_configs
175 suppressed_configs = [] 177 suppressed_configs = []
176 } 178 }
177 179
178 set_defaults("rtc_executable") { 180 set_defaults("rtc_executable") {
179 configs = [] 181 configs = rtc_add_configs
180 suppressed_configs = [] 182 suppressed_configs = []
181 } 183 }
182 184
183 set_defaults("rtc_static_library") { 185 set_defaults("rtc_static_library") {
184 configs = [] 186 configs = rtc_add_configs
185 suppressed_configs = [] 187 suppressed_configs = []
186 } 188 }
187 189
188 template("rtc_test") { 190 template("rtc_test") {
189 test(target_name) { 191 test(target_name) {
190 forward_variables_from(invoker, 192 forward_variables_from(invoker,
191 "*", 193 "*",
192 [ 194 [
193 "configs", 195 "configs",
194 "suppressed_configs", 196 "suppressed_configs",
195 ]) 197 ])
196 configs += invoker.configs 198 configs += invoker.configs
197 configs += rtc_add_configs
198 configs -= rtc_remove_configs 199 configs -= rtc_remove_configs
199 configs -= invoker.suppressed_configs 200 configs -= invoker.suppressed_configs
200 } 201 }
201 } 202 }
202 203
203 template("rtc_source_set") { 204 template("rtc_source_set") {
204 source_set(target_name) { 205 source_set(target_name) {
205 forward_variables_from(invoker, 206 forward_variables_from(invoker,
206 "*", 207 "*",
207 [ 208 [
208 "configs", 209 "configs",
209 "suppressed_configs", 210 "suppressed_configs",
210 ]) 211 ])
211 configs += invoker.configs 212 configs += invoker.configs
212 configs += rtc_add_configs
213 configs -= rtc_remove_configs 213 configs -= rtc_remove_configs
214 configs -= invoker.suppressed_configs 214 configs -= invoker.suppressed_configs
215 } 215 }
216 } 216 }
217 217
218 template("rtc_executable") { 218 template("rtc_executable") {
219 executable(target_name) { 219 executable(target_name) {
220 forward_variables_from(invoker, 220 forward_variables_from(invoker,
221 "*", 221 "*",
222 [ 222 [
223 "deps", 223 "deps",
224 "configs", 224 "configs",
225 "suppressed_configs", 225 "suppressed_configs",
226 ]) 226 ])
227 configs += invoker.configs 227 configs += invoker.configs
228 configs += rtc_add_configs
229 configs -= rtc_remove_configs 228 configs -= rtc_remove_configs
230 configs -= invoker.suppressed_configs 229 configs -= invoker.suppressed_configs
231 deps = [ 230 deps = [
232 "//build/config/sanitizers:deps", 231 "//build/config/sanitizers:deps",
233 ] 232 ]
234 deps += invoker.deps 233 deps += invoker.deps
235 } 234 }
236 } 235 }
237 236
238 template("rtc_static_library") { 237 template("rtc_static_library") {
239 static_library(target_name) { 238 static_library(target_name) {
240 forward_variables_from(invoker, 239 forward_variables_from(invoker,
241 "*", 240 "*",
242 [ 241 [
243 "configs", 242 "configs",
244 "suppressed_configs", 243 "suppressed_configs",
245 ]) 244 ])
246 configs += invoker.configs 245 configs += invoker.configs
247 configs += rtc_add_configs
248 configs -= rtc_remove_configs 246 configs -= rtc_remove_configs
249 configs -= invoker.suppressed_configs 247 configs -= invoker.suppressed_configs
250 } 248 }
251 } 249 }
OLDNEW
« no previous file with comments | « webrtc/base/BUILD.gn ('k') | webrtc/call/BUILD.gn » ('j') | webrtc/examples/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698