1b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org# Copyright 2013 The Chromium Authors. All rights reserved.
2b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org# Use of this source code is governed by a BSD-style license that can be
3b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org# found in the LICENSE file.
4b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org
5b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org{
6b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org  'includes': [
7b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org    'icu.gypi',
8b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org    '../../native_client/build/untrusted.gypi',
9b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org  ],
10b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org  'target_defaults': {
11b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org    'direct_dependent_settings': {
12b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'defines': [
13b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        # Tell ICU to not insert |using namespace icu;| into its headers,
14b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        # so that chrome's source explicitly has to use |icu::|.
15b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        'U_USING_ICU_NAMESPACE=0',
1651fac8a82606491eec234802f0e9b151206dc4c9jshin@chromium.org        # We don't use ICU plugins and dyload is only necessary for them.
1751fac8a82606491eec234802f0e9b151206dc4c9jshin@chromium.org        # NaCl-related builds also fail looking for dlfcn.h when it's enabled.
1851fac8a82606491eec234802f0e9b151206dc4c9jshin@chromium.org        'U_ENABLE_DYLOAD=0',
19b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      ],
20b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org    },
21b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org    'defines': [
22b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'U_USING_ICU_NAMESPACE=0',
23b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'U_STATIC_IMPLEMENTATION',
24b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org    ],
25b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org    'include_dirs': [
26b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'source/common',
27b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'source/i18n',
28b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org    ],
29b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org    'pnacl_compile_flags': [
30b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      '-Wno-char-subscripts',
31b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      '-Wno-deprecated-declarations',
32b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      '-Wno-header-hygiene',
33b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      '-Wno-logical-op-parentheses',
34b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      '-Wno-return-type-c-linkage',
35b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      '-Wno-switch',
36b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      '-Wno-tautological-compare',
37b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      '-Wno-unused-variable'
38b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org    ],
39b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org  },
40b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org  'targets': [
41b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org    {
42b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'target_name': 'icudata_nacl',
43b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'type': 'none',
44b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'variables': {
45b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        'nlib_target': 'libicudata_nacl.a',
46b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        'build_glibc': 0,
47b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        'build_newlib': 0,
48b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        'build_pnacl_newlib': 1,
49b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      },
50b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'sources': [
51b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        'source/stubdata/stubdata.c',
52cbd9815dfd06d31571725d2c8de12fc5be204c05jshin@chromium.org        # Temporary work around for an incremental build NOT rebuilding 
53cbd9815dfd06d31571725d2c8de12fc5be204c05jshin@chromium.org        # icudata_nacl after an ICU version change.
54cbd9815dfd06d31571725d2c8de12fc5be204c05jshin@chromium.org        # TODO(jungshik): Remove it once a fix for bug 384752 is in.
55cbd9815dfd06d31571725d2c8de12fc5be204c05jshin@chromium.org        'source/common/unicode/uvernum.h',
56b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      ],
57b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'dependencies': [
58b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        '../../native_client/tools.gyp:prep_toolchain',
59b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      ],
60b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org    },
61b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org    {
62b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'target_name': 'icui18n_nacl',
63b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'type': 'none',
64b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'variables': {
65b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        'nlib_target': 'libicui18n_nacl.a',
66b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        'build_glibc': 0,
67b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        'build_newlib': 0,
68b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        'build_pnacl_newlib': 1,
69b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      },
70b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'sources': [
71b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        '<@(icui18n_sources)',
72b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      ],
73b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'defines': [
74b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        'U_I18N_IMPLEMENTATION',
75b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      ],
76b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'dependencies': [
77b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        '../../native_client/tools.gyp:prep_toolchain',
78b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        'icuuc_nacl',
79b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      ],
80b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'direct_dependent_settings': {
81b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        'include_dirs': [
82b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org          'source/i18n',
83b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        ],
84b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      },
85b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org    },
86b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org    {
87b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'target_name': 'icuuc_nacl',
88b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'type': 'none',
89b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'variables': {
90b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        'nlib_target': 'libicuuc_nacl.a',
91b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        'build_glibc': 0,
92b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        'build_newlib': 0,
93b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        'build_pnacl_newlib': 1,
94b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      },
95b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'sources': [
96b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        '<@(icuuc_sources)',
97b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      ],
98b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'defines': [
99b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        'U_COMMON_IMPLEMENTATION',
100b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      ],
101b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'dependencies': [
102b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        '../../native_client/tools.gyp:prep_toolchain',
103b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        'icudata_nacl',
104b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      ],
105b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      'direct_dependent_settings': {
106b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        'include_dirs': [
107b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org          'source/common',
108b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        ],
109b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        'defines': [
110b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org          'U_STATIC_IMPLEMENTATION',
111b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org        ],
112b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org      },
113b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org    },
114b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org  ],
115b56484028c6eff42dc71fd4b9fc6bc82e856fb78jshin@chromium.org}
116