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

Side by Side Diff: gn/BUILDCONFIG.gn

Issue 2197633002: GN: components as static library instead of source set (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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 | « gn/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 Google Inc. 1 # Copyright 2016 Google Inc.
2 # 2 #
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # It's best to keep the names and defaults of is_foo flags consistent with Chrom e. 6 # It's best to keep the names and defaults of is_foo flags consistent with Chrom e.
7 7
8 declare_args() { 8 declare_args() {
9 is_debug = true 9 is_debug = true
10 is_component_build = false 10 is_component_build = false
11 } 11 }
12 12
13 # Platform detection 13 # Platform detection
14 if (target_os == "") { 14 if (target_os == "") {
15 target_os = host_os 15 target_os = host_os
16 } 16 }
17 if (current_os == "") { 17 if (current_os == "") {
18 current_os = target_os 18 current_os = target_os
19 } 19 }
20 20
21 is_android = current_os == "android" 21 is_android = current_os == "android"
22 is_fuchsia = current_os == "fuchsia" 22 is_fuchsia = current_os == "fuchsia"
23 is_ios = current_os == "ios" 23 is_ios = current_os == "ios"
24 is_linux = current_os == "linux" 24 is_linux = current_os == "linux"
25 is_mac = current_os == "mac" 25 is_mac = current_os == "mac"
26 is_win = current_os == "win" 26 is_win = current_os == "win"
27 27
28 is_posix = !is_win 28 is_posix = !is_win
29 29
30 # A component is either a source_set or a shared_library. 30 # A component is either a static or a shared library.
31 template("component") { 31 template("component") {
32 _component_mode = "source_set" 32 _component_mode = "static_library"
33 if (is_component_build) { 33 if (is_component_build) {
34 _component_mode = "shared_library" 34 _component_mode = "shared_library"
35 } 35 }
36 36
37 target(_component_mode, target_name) { 37 target(_component_mode, target_name) {
38 forward_variables_from(invoker, "*") 38 forward_variables_from(invoker, "*")
39 } 39 }
40 } 40 }
41 41
42 # Default configs 42 # Default configs
(...skipping 17 matching lines...) Expand all
60 set_defaults("shared_library") { 60 set_defaults("shared_library") {
61 configs = _default_configs 61 configs = _default_configs
62 } 62 }
63 63
64 set_defaults("component") { 64 set_defaults("component") {
65 configs = _default_configs 65 configs = _default_configs
66 } 66 }
67 67
68 # For now, we support GCC-like toolchains, including Clang. 68 # For now, we support GCC-like toolchains, including Clang.
69 set_default_toolchain("//gn:gcc_like") 69 set_default_toolchain("//gn:gcc_like")
OLDNEW
« no previous file with comments | « gn/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698