OLD | NEW |
---|---|
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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("//third_party/icu/config.gni") | 5 import("//third_party/icu/config.gni") |
6 | 6 |
7 if (is_android) { | 7 if (is_android) { |
8 import("//build/config/android/rules.gni") | 8 import("//build/config/android/rules.gni") |
9 } | 9 } |
10 | 10 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
66 # Will cut down the code size. | 66 # Will cut down the code size. |
67 "U_CHARSET_IS_UTF8=1", | 67 "U_CHARSET_IS_UTF8=1", |
68 ] | 68 ] |
69 | 69 |
70 if (is_win) { | 70 if (is_win) { |
71 # Disable some compiler warnings. | 71 # Disable some compiler warnings. |
72 cflags += [ | 72 cflags += [ |
73 "/wd4005", # Macro redefinition. | 73 "/wd4005", # Macro redefinition. |
74 "/wd4068", # Unknown pragmas. | 74 "/wd4068", # Unknown pragmas. |
75 "/wd4267", # Conversion from size_t on 64-bits. | 75 "/wd4267", # Conversion from size_t on 64-bits. |
76 "/wd4996", # Deprecated functions. | |
77 # http://bugs.icu-project.org/trac/ticket/12821 | |
jungshik at Google
2016/11/15 18:06:36
Did you mean to remove this comment? It's for wd43
brucedawson
2016/11/15 19:53:48
Good catch. I accidentally associated the comment
| |
78 "/wd4333", # Right shift by too large amount. | 76 "/wd4333", # Right shift by too large amount. |
79 ] | 77 ] |
80 } else if (is_linux || is_android) { | 78 } else if (is_linux || is_android) { |
81 cflags += [ | 79 cflags += [ |
82 # Since ICU wants to internally use its own deprecated APIs, don't | |
83 # complain about it. | |
84 "-Wno-deprecated-declarations", | |
85 "-Wno-unused-function", | 80 "-Wno-unused-function", |
86 ] | 81 ] |
87 } | 82 } |
88 if (is_clang) { | 83 if (is_clang) { |
89 cflags += [ | 84 cflags += [ |
90 # ICU uses its own deprecated functions. | |
91 "-Wno-deprecated-declarations", | |
92 # ICU prefers `a && b || c` over `(a && b) || c`. | |
93 "-Wno-logical-op-parentheses", | |
94 # ICU has some `unsigned < 0` checks. | |
95 "-Wno-tautological-compare", | |
96 # uresdata.c has switch(RES_GET_TYPE(x)) code. The | |
97 # RES_GET_TYPE macro returns an UResType enum, but some switch | |
98 # statement contains case values that aren't part of that | |
99 # enum (e.g. URES_TABLE32 which is in UResInternalType). This | |
100 # is on purpose. | |
101 "-Wno-switch", | |
102 # ICU has some code with the pattern: | 85 # ICU has some code with the pattern: |
103 # if (found = uprv_getWindowsTimeZoneInfo(...)) | 86 # if (found = uprv_getWindowsTimeZoneInfo(...)) |
104 "-Wno-parentheses", | 87 "-Wno-parentheses", |
105 # ucnv2022.cpp contains three functions that are only used when | 88 # ucnv2022.cpp contains three functions that are only used when |
106 # certain preprocessor defines are set. | 89 # certain preprocessor defines are set. |
107 # unistr.cpp also has an unused function for non-component builds. | 90 # unistr.cpp also has an unused function for non-component builds. |
108 "-Wno-unused-function", | 91 "-Wno-unused-function", |
109 ] | 92 ] |
110 if (is_win) { | |
111 cflags += [ | |
112 # See http://bugs.icu-project.org/trac/ticket/11122 | |
113 "-Wno-inline-new-delete", | |
114 "-Wno-implicit-exception-spec-mismatch", | |
115 # See http://www.icu-project.org/trac/ticket/11759. | |
116 "-Wno-unused-const-variable", | |
117 ] | |
118 } | |
119 } | 93 } |
120 } | 94 } |
121 | 95 |
122 component("icui18n") { | 96 component("icui18n") { |
123 # find source/i18n -maxdepth 1 ! -type d | egrep '\.(c|cpp|h)$' |\ | 97 # find source/i18n -maxdepth 1 ! -type d | egrep '\.(c|cpp|h)$' |\ |
124 # sort | sed 's/^\(.*\)$/ "\1",/' | 98 # sort | sed 's/^\(.*\)$/ "\1",/' |
125 sources = [ | 99 sources = [ |
126 "source/i18n/affixpatternparser.cpp", | 100 "source/i18n/affixpatternparser.cpp", |
127 "source/i18n/affixpatternparser.h", | 101 "source/i18n/affixpatternparser.h", |
128 "source/i18n/alphaindex.cpp", | 102 "source/i18n/alphaindex.cpp", |
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1047 } | 1021 } |
1048 } | 1022 } |
1049 | 1023 |
1050 source_set("icudata") { | 1024 source_set("icudata") { |
1051 sources = [ "$data_assembly" ] | 1025 sources = [ "$data_assembly" ] |
1052 defines = [ "U_HIDE_DATA_SYMBOL" ] | 1026 defines = [ "U_HIDE_DATA_SYMBOL" ] |
1053 deps = [ ":make_data_assembly", ] | 1027 deps = [ ":make_data_assembly", ] |
1054 } | 1028 } |
1055 } | 1029 } |
1056 } | 1030 } |
OLD | NEW |