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

Side by Side Diff: url/BUILD.gn

Issue 1287893005: Reland: Make separate net and url GN targets with and without ICU (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 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 | « net/net_common.gypi ('k') | url/config.gni » ('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) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//testing/test.gni") 5 import("//testing/test.gni")
6 import("//url/config.gni")
7 6
8 # Sets the USE_ICU_ALTERNATIVES_ON_ANDROID define based on the build flag. 7 if (is_android) {
9 config("url_icu_config") { 8 import("//build/config/android/rules.gni")
10 if (use_icu_alternatives_on_android) {
11 defines = [ "USE_ICU_ALTERNATIVES_ON_ANDROID=1" ]
12 }
13 } 9 }
14 10
11 # Shared sources between url and url_lib_use_icu_alternatives_on_android.
12 url_shared_sources = [
13 "gurl.cc",
14 "gurl.h",
15 "origin.cc",
16 "origin.h",
17 "scheme_host_port.cc",
18 "scheme_host_port.h",
19 "third_party/mozilla/url_parse.cc",
20 "third_party/mozilla/url_parse.h",
21 "url_canon.h",
22 "url_canon_etc.cc",
23 "url_canon_filesystemurl.cc",
24 "url_canon_fileurl.cc",
25 "url_canon_host.cc",
26 "url_canon_internal.cc",
27 "url_canon_internal.h",
28 "url_canon_internal_file.h",
29 "url_canon_ip.cc",
30 "url_canon_ip.h",
31 "url_canon_mailtourl.cc",
32 "url_canon_path.cc",
33 "url_canon_pathurl.cc",
34 "url_canon_query.cc",
35 "url_canon_relative.cc",
36 "url_canon_stdstring.cc",
37 "url_canon_stdstring.h",
38 "url_canon_stdurl.cc",
39 "url_constants.cc",
40 "url_constants.h",
41 "url_export.h",
42 "url_file.h",
43 "url_parse_file.cc",
44 "url_parse_internal.h",
45 "url_util.cc",
46 "url_util.h",
47 ]
48
15 component("url") { 49 component("url") {
50 sources = url_shared_sources + [
51 "url_canon_icu.cc",
52 "url_canon_icu.h",
53 ]
54
16 if (is_win) { 55 if (is_win) {
17 # Don't conflict with Windows' "url.dll". 56 # Don't conflict with Windows' "url.dll".
18 output_name = "url_lib" 57 output_name = "url_lib"
19 } 58 }
20 sources = [
21 "android/url_jni_registrar.cc",
22 "android/url_jni_registrar.h",
23 "gurl.cc",
24 "gurl.h",
25 "origin.cc",
26 "origin.h",
27 "scheme_host_port.cc",
28 "scheme_host_port.h",
29 "third_party/mozilla/url_parse.cc",
30 "third_party/mozilla/url_parse.h",
31 "url_canon.h",
32 "url_canon_etc.cc",
33 "url_canon_filesystemurl.cc",
34 "url_canon_fileurl.cc",
35 "url_canon_host.cc",
36 "url_canon_icu.cc",
37 "url_canon_icu.h",
38 "url_canon_internal.cc",
39 "url_canon_internal.h",
40 "url_canon_internal_file.h",
41 "url_canon_ip.cc",
42 "url_canon_ip.h",
43 "url_canon_mailtourl.cc",
44 "url_canon_path.cc",
45 "url_canon_pathurl.cc",
46 "url_canon_query.cc",
47 "url_canon_relative.cc",
48 "url_canon_stdstring.cc",
49 "url_canon_stdstring.h",
50 "url_canon_stdurl.cc",
51 "url_constants.cc",
52 "url_constants.h",
53 "url_export.h",
54 "url_file.h",
55 "url_parse_file.cc",
56 "url_parse_internal.h",
57 "url_util.cc",
58 "url_util.h",
59 ]
60
61 defines = [ "URL_IMPLEMENTATION" ] 59 defines = [ "URL_IMPLEMENTATION" ]
62 60
63 configs += [ 61 configs += [
64 ":url_icu_config",
65
66 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 62 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
67 "//build/config/compiler:no_size_t_to_int_warning", 63 "//build/config/compiler:no_size_t_to_int_warning",
68 ] 64 ]
69 65
70 deps = [ 66 deps = [
71 "//base", 67 "//base",
72 "//base/third_party/dynamic_annotations", 68 "//base/third_party/dynamic_annotations",
73 "//third_party/icu:icudata", 69 "//third_party/icu:icudata",
74 "//third_party/icu", 70 "//third_party/icu",
75 ] 71 ]
72 }
76 73
77 if (use_icu_alternatives_on_android) { 74 if (is_android) {
78 sources -= [ 75 generate_jni("url_jni_headers") {
79 "url_canon_icu.cc", 76 sources = [
80 "url_canon_icu.h", 77 "android/java/src/org/chromium/url/IDNStringUtil.java",
81 ] 78 ]
82 deps -= [ 79 jni_package = "url"
83 "//third_party/icu:icudata", 80 }
84 "//third_party/icu", 81
82 component("url_lib_use_icu_alternatives_on_android") {
83 sources = url_shared_sources + [
84 "android/url_jni_registrar.cc",
85 "android/url_jni_registrar.h",
86 "url_canon_icu_alternatives_android.cc",
87 "url_canon_icu_alternatives_android.h",
88 ]
89
90 defines = [
91 "URL_IMPLEMENTATION",
92 "USE_ICU_ALTERNATIVES_ON_ANDROID=1",
85 ] 93 ]
86 94
87 sources += [ 95 configs += [
88 "url_canon_icu_alternatives_android.cc", 96 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
89 "url_canon_icu_alternatives_android.h", 97 "//build/config/compiler:no_size_t_to_int_warning",
98 ]
99
100 deps = [
101 ":url_jni_headers",
102 "//base",
103 "//base/third_party/dynamic_annotations",
90 ] 104 ]
91 } 105 }
92 } 106 }
93 107
94 # TODO(dpranke): crbug.com/360936. Get this to build and run on Android. 108 # TODO(dpranke): crbug.com/360936. Get this to build and run on Android.
95 if (!is_android) { 109 if (!is_android) {
96 # TODO(GYP): Delete this after we've converted everything to GN. 110 # TODO(GYP): Delete this after we've converted everything to GN.
97 # The _run targets exist only for compatibility w/ GYP. 111 # The _run targets exist only for compatibility w/ GYP.
98 group("url_unittests_run") { 112 group("url_unittests_run") {
99 testonly = true 113 testonly = true
(...skipping 23 matching lines...) Expand all
123 # } 137 # }
124 #} 138 #}
125 139
126 deps = [ 140 deps = [
127 ":url", 141 ":url",
128 "//base", 142 "//base",
129 "//base/test:run_all_unittests", 143 "//base/test:run_all_unittests",
130 "//testing/gtest", 144 "//testing/gtest",
131 "//third_party/icu:icuuc", 145 "//third_party/icu:icuuc",
132 ] 146 ]
133
134 if (use_icu_alternatives_on_android) {
135 sources -= [ "url_canon_icu_unittest.cc" ]
136 deps -= [ "//third_party/icu:icuuc" ]
137 }
138 } 147 }
139 } 148 }
OLDNEW
« no previous file with comments | « net/net_common.gypi ('k') | url/config.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698