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 # Meta target that includes both icuuc and icui18n. Most targets want both. | 7 # Meta target that includes both icuuc and icui18n. Most targets want both. |
8 # You can depend on the individually if you need to. | 8 # You can depend on the individually if you need to. |
9 group("icu") { | 9 group("icu") { |
10 deps = [ | 10 deps = [ |
11 ":icui18n", | 11 ":icui18n", |
12 ":icuuc", | 12 ":icuuc", |
13 ] | 13 ] |
14 } | 14 } |
15 | 15 |
16 # Shared config used by ICU and all dependents. | 16 # Shared config used by ICU and all dependents. |
17 config("icu_config") { | 17 config("icu_config") { |
18 defines = [ | 18 defines = [ |
| 19 # Tell ICU to not insert |using namespace icu;| into its headers, |
| 20 # so that chrome's source explicitly has to use |icu::|. |
19 "U_USING_ICU_NAMESPACE=0", | 21 "U_USING_ICU_NAMESPACE=0", |
| 22 |
| 23 # We don't use ICU plugins and dyload is only necessary for them. |
| 24 # NaCl-related builds also fail looking for dlfcn.h when it's enabled. |
20 "U_ENABLE_DYLOAD=0", | 25 "U_ENABLE_DYLOAD=0", |
21 "UCONFIG_NO_NON_HTML5_CONVERSION=1", | |
22 "U_CHARSET_IS_UTF8=1", | |
23 ] | 26 ] |
24 | 27 |
25 if (component_mode != "shared_library") { | 28 if (component_mode != "shared_library") { |
26 defines += [ "U_STATIC_IMPLEMENTATION" ] | 29 defines += [ "U_STATIC_IMPLEMENTATION" ] |
27 } | 30 } |
28 | 31 |
29 include_dirs = [ | 32 include_dirs = [ |
30 "source/common", | 33 "source/common", |
31 "source/i18n", | 34 "source/i18n", |
32 ] | 35 ] |
33 } | 36 } |
34 | 37 |
35 # Config used only by ICU code. | 38 # Config used only by ICU code. |
36 config("icu_code") { | 39 config("icu_code") { |
37 cflags = [] | 40 cflags = [] |
| 41 defines = [ |
| 42 "HAVE_DLOPEN=0", |
| 43 |
| 44 # Only build encoding coverters and detectors necessary for HTML5. |
| 45 "UCONFIG_NO_NON_HTML5_CONVERSION=1", |
| 46 |
| 47 # No dependency on the default platform encoding. |
| 48 # Will cut down the code size. |
| 49 "U_CHARSET_IS_UTF8=1", |
| 50 ] |
| 51 |
38 if (is_win) { | 52 if (is_win) { |
39 # Disable some compiler warnings. | 53 # Disable some compiler warnings. |
40 cflags += [ | 54 cflags += [ |
41 "/wd4005", # Macro redefinition. | 55 "/wd4005", # Macro redefinition. |
42 "/wd4068", # Unknown pragmas. | 56 "/wd4068", # Unknown pragmas. |
43 "/wd4267", # Conversion from size_t on 64-bits. | 57 "/wd4267", # Conversion from size_t on 64-bits. |
44 "/wd4996", # Deprecated functions. | 58 "/wd4996", # Deprecated functions. |
45 ] | 59 ] |
46 } else if (is_linux) { | 60 } else if (is_linux) { |
47 cflags += [ | 61 cflags += [ |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 sources = [ | 561 sources = [ |
548 "android/icudtl_dat.S", | 562 "android/icudtl_dat.S", |
549 ] | 563 ] |
550 } else { | 564 } else { |
551 assert(false, "No icu data for this platform") | 565 assert(false, "No icu data for this platform") |
552 } | 566 } |
553 defines = [ "U_HIDE_DATA_SYMBOL" ] | 567 defines = [ "U_HIDE_DATA_SYMBOL" ] |
554 } | 568 } |
555 } | 569 } |
556 } | 570 } |
OLD | NEW |