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

Side by Side Diff: icu.gyp

Issue 2162393003: fix errors, support data file copy for big endian (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: update icudtb.dat Created 4 years, 5 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 | « common/icudtb.dat ('k') | scripts/make_data_assembly.py » ('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) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 { 5 {
6 'includes': [ 6 'includes': [
7 'icu.gypi', 7 'icu.gypi',
8 ], 8 ],
9 'variables': { 9 'variables': {
10 'use_system_icu%': 0, 10 'use_system_icu%': 0,
(...skipping 27 matching lines...) Expand all
38 ], 38 ],
39 'conditions': [ 39 'conditions': [
40 ['component=="static_library"', { 40 ['component=="static_library"', {
41 'defines': [ 41 'defines': [
42 'U_STATIC_IMPLEMENTATION', 42 'U_STATIC_IMPLEMENTATION',
43 ], 43 ],
44 }], 44 }],
45 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \ 45 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
46 or OS=="netbsd" or OS=="mac" or OS=="android" or OS=="qnx") and \ 46 or OS=="netbsd" or OS=="mac" or OS=="android" or OS=="qnx") and \
47 (target_arch=="arm" or target_arch=="ia32" or \ 47 (target_arch=="arm" or target_arch=="ia32" or \
48 target_arch=="mipsel")', { 48 target_arch=="mipsel" or target_arch=="mips")', {
49 'target_conditions': [ 49 'target_conditions': [
50 ['_toolset=="host"', { 50 ['_toolset=="host"', {
51 'cflags': [ '-m32' ], 51 'cflags': [ '-m32' ],
52 'ldflags': [ '-m32' ], 52 'ldflags': [ '-m32' ],
53 'asflags': [ '-32' ], 53 'asflags': [ '-32' ],
54 'xcode_settings': { 54 'xcode_settings': {
55 'ARCHS': [ 'i386' ], 55 'ARCHS': [ 'i386' ],
56 }, 56 },
57 }], 57 }],
58 ], 58 ],
59 }], 59 }],
60 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \ 60 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
61 or OS=="netbsd" or OS=="mac" or OS=="android" or OS=="qnx") and \ 61 or OS=="netbsd" or OS=="mac" or OS=="android" or OS=="qnx") and \
62 (target_arch=="arm64" or target_arch=="x64" or \ 62 (target_arch=="arm64" or target_arch=="x64" or \
63 target_arch=="mipsel64")', { 63 target_arch=="mips64el" or target_arch=="mips64")', {
64 'target_conditions': [ 64 'target_conditions': [
65 ['_toolset=="host"', { 65 ['_toolset=="host"', {
66 'cflags': [ '-m64' ], 66 'cflags': [ '-m64' ],
67 'ldflags': [ '-m64' ], 67 'ldflags': [ '-m64' ],
68 'asflags': [ '-64' ], 68 'asflags': [ '-64' ],
69 'xcode_settings': { 69 'xcode_settings': {
70 'ARCHS': [ 'x86_64' ], 70 'ARCHS': [ 'x86_64' ],
71 }, 71 },
72 }], 72 }],
73 ], 73 ],
74 }], 74 }],
75 ], 75 ],
76 'include_dirs': [ 76 'include_dirs': [
77 'source/common', 77 'source/common',
78 'source/i18n', 78 'source/i18n',
79 ], 79 ],
80 'msvs_disabled_warnings': [4005, 4068, 4355, 4996, 4267], 80 'msvs_disabled_warnings': [4005, 4068, 4355, 4996, 4267],
81 }, 81 },
82 'conditions': [ 82 'conditions': [
83 ['use_system_icu==0 or want_separate_host_toolset==1', { 83 ['use_system_icu==0 or want_separate_host_toolset==1', {
84 'targets': [ 84 'targets': [
85 { 85 {
86 'target_name': 'copy_icudtl_dat', 86 'target_name': 'copy_icudt_dat',
87 'type': 'none', 87 'type': 'none',
88 # icudtl.dat is the same for both host/target, so this only supports a 88 # icudtl.dat is the same for both host/target, so this only supports a
89 # single toolset. If a target requires that the .dat file be copied 89 # single toolset. If a target requires that the .dat file be copied
90 # to the output directory, it should explicitly depend on this target 90 # to the output directory, it should explicitly depend on this target
91 # with the host toolset (like copy_icudtl_dat#host). 91 # with the host toolset (like copy_icudt_dat#host).
92 'toolsets': [ 'host' ], 92 'toolsets': [ 'host' ],
93 'copies': [{ 93 'copies': [{
94 'destination': '<(PRODUCT_DIR)', 94 'destination': '<(PRODUCT_DIR)',
95 'conditions': [ 95 'conditions': [
96 ['OS == "android"', { 96 ['OS == "android"', {
97 'files': [ 97 'files': [
98 'android/icudtl.dat', 98 'android/icudtl.dat',
99 ], 99 ],
100 } , { # else: OS != android 100 } , { # else: OS != android
101 'files': [ 101 'conditions': [
102 'common/icudtl.dat', 102 # Big Endian
103 [ 'target_arch=="mips" or target_arch=="mips64"', {
104 'files': [
105 'common/icudtb.dat',
106 ],
107 } , { # else: ! Big Endian = Little Endian
108 'files': [
109 'common/icudtl.dat',
110 ],
111 }],
103 ], 112 ],
104 }], 113 }],
105 ], 114 ],
106 }], 115 }],
107 }, 116 },
108 { 117 {
118 'target_name': 'data_assembly',
119 'type': 'none',
120 'conditions': [
121 [ 'target_arch=="mips" or target_arch=="mips64"', {
122 'data_assembly_sources': [
123 'common/icudtb.dat',
124 ],
125 'data_assembly_inputs': [
126 'scripts/make_data_assembly.py',
127 'common/icudtb.dat',
128 ],
129 'data_assembly_outputs': [
130 '<(SHARED_INTERMEDIATE_DIR)/third_party/icu/icudtb_dat.S',
131 ],
132 }],
133 [ 'target_arch!="mips" and target_arch!="mips64"', {
134 'data_assembly_sources': [
135 'common/icudtl.dat',
136 ],
137 'data_assembly_inputs': [
138 'scripts/make_data_assembly.py',
139 'common/icudtl.dat',
140 ],
141 'data_assembly_outputs': [
142 '<(SHARED_INTERMEDIATE_DIR)/third_party/icu/icudtl_dat.S',
143 ],
144 }],
145 ],
146 'sources': [
147 '<@(_data_assembly_sources)',
148 ],
149 'actions': [
150 {
151 'action_name': 'make_data_assembly',
152 'inputs': [
153 '<@(_data_assembly_inputs)',
154 ],
155 'outputs': [
156 '<@(_data_assembly_outputs)',
157 ],
158 'action': ['python', '<@(_inputs)', '<@(_outputs)'],
159 },
160 ],
161 },
162 {
109 'target_name': 'icudata', 163 'target_name': 'icudata',
110 'type': 'static_library', 164 'type': 'static_library',
111 'defines': [ 165 'defines': [
112 'U_HIDE_DATA_SYMBOL', 166 'U_HIDE_DATA_SYMBOL',
113 ], 167 ],
168 'dependencies': [
169 'data_assembly#target',
170 ],
114 'sources': [ 171 'sources': [
115 # These are hand-generated, but will do for now. The linux 172 # These are hand-generated, but will do for now. The linux
116 # version is an identical copy of the (mac) icudtl_dat.S file, 173 # version is an identical copy of the (mac) icudtl_dat.S file,
117 # modulo removal of the .private_extern and .const directives and 174 # modulo removal of the .private_extern and .const directives and
118 # with no leading underscore on the icudt52_dat symbol. 175 # with no leading underscore on the icudt52_dat symbol.
119 'android/icudtl_dat.S', 176 'android/icudtl_dat.S',
120 'linux/icudtl_dat.S', 177 '<(SHARED_INTERMEDIATE_DIR)/third_party/icu/icudtl_dat.S',
178 '<(SHARED_INTERMEDIATE_DIR)/third_party/icu/icudtb_dat.S',
121 'mac/icudtl_dat.S', 179 'mac/icudtl_dat.S',
122 ], 180 ],
123 'conditions': [ 181 'conditions': [
182 [ 'target_arch=="mips" or target_arch=="mips64"', {
183 'sources!': ['<(SHARED_INTERMEDIATE_DIR)/third_party/icu/icudtl_da t.S'],
184 }],
185 [ 'target_arch!="mips" and target_arch!="mips64"', {
186 'sources!': ['<(SHARED_INTERMEDIATE_DIR)/third_party/icu/icudtb_da t.S'],
187 }],
124 [ 'use_system_icu==1 and want_separate_host_toolset==1', { 188 [ 'use_system_icu==1 and want_separate_host_toolset==1', {
125 'toolsets': ['host'], 189 'toolsets': ['host'],
126 }], 190 }],
127 [ 'use_system_icu==0 and want_separate_host_toolset==1', { 191 [ 'use_system_icu==0 and want_separate_host_toolset==1', {
128 'toolsets': ['host', 'target'], 192 'toolsets': ['host', 'target'],
129 }], 193 }],
130 [ 'use_system_icu==0 and want_separate_host_toolset==0', { 194 [ 'use_system_icu==0 and want_separate_host_toolset==0', {
131 'toolsets': ['target'], 195 'toolsets': ['target'],
132 }], 196 }],
133 [ 'OS == "win" and icu_use_data_file_flag==0', { 197 [ 'OS == "win" and icu_use_data_file_flag==0', {
134 'type': 'none', 198 'type': 'none',
199 'dependencies!': [
200 'data_assembly#target',
201 ],
135 'copies': [ 202 'copies': [
136 { 203 {
137 'destination': '<(PRODUCT_DIR)', 204 'destination': '<(PRODUCT_DIR)',
138 'files': [ 205 'files': [
139 'windows/icudt.dll', 206 'windows/icudt.dll',
140 ], 207 ],
141 }, 208 },
142 ], 209 ],
143 }], 210 }],
211 [ '(OS == "mac" or OS == "ios") and icu_use_data_file_flag==0', {
212 'type': 'none',
213 'dependencies!': [
214 'data_assembly#target',
215 ],
216 }],
144 [ 'icu_use_data_file_flag==1', { 217 [ 'icu_use_data_file_flag==1', {
145 'type': 'none', 218 'type': 'none',
219 'dependencies!': [
220 'data_assembly#target',
221 ],
146 # Remove any assembly data file. 222 # Remove any assembly data file.
147 'sources/': [['exclude', 'icudtl_dat']], 223 'sources/': [['exclude', 'icudt[lb]_dat']],
148 224
149 # Make sure any binary depending on this gets the data file. 225 # Make sure any binary depending on this gets the data file.
150 'conditions': [ 226 'conditions': [
151 ['OS != "ios"', { 227 ['OS != "ios"', {
152 'dependencies': [ 228 'dependencies': [
153 'copy_icudtl_dat#host', 229 'copy_icudt_dat#host',
154 ], 230 ],
155 } , { # else: OS=="ios" 231 } , { # else: OS=="ios"
156 'link_settings': { 232 'link_settings': {
157 'mac_bundle_resources': [ 233 'mac_bundle_resources': [
158 'common/icudtl.dat', 234 'common/icudtl.dat',
159 ], 235 ],
160 }, 236 },
161 }], # OS!=ios 237 }], # OS!=ios
162 ], # conditions 238 ], # conditions
163 }], # icu_use_data_file_flag 239 }], # icu_use_data_file_flag
164 ], # conditions 240 ], # conditions
165 'target_conditions': [ 241 'target_conditions': [
166 [ 'OS == "win" or OS == "mac" or OS == "ios" or ' 242 [ 'OS == "win" or OS == "mac" or OS == "ios" or '
167 '(OS == "android" and (_toolset != "host" or host_os != "linux")) or ' 243 '(OS == "android" and (_toolset != "host" or host_os != "linux")) or '
168 '(OS == "qnx" and (_toolset == "host" and host_os != "linux"))', { 244 '(OS == "qnx" and (_toolset == "host" and host_os != "linux"))', {
169 'sources!': ['linux/icudtl_dat.S'], 245 'sources!': [
246 '<(SHARED_INTERMEDIATE_DIR)/third_party/icu/icudtl_dat.S',
247 '<(SHARED_INTERMEDIATE_DIR)/third_party/icu/icudtb_dat.S'
248 ],
170 }], 249 }],
171 [ 'OS != "android" or _toolset == "host"', { 250 [ 'OS != "android" or _toolset == "host"', {
172 'sources!': ['android/icudtl_dat.S'], 251 'sources!': ['android/icudtl_dat.S'],
173 }], 252 }],
174 [ 'OS != "mac" and OS != "ios" and ' 253 [ 'OS != "mac" and OS != "ios" and '
175 '((OS != "android" and OS != "qnx") or ' 254 '((OS != "android" and OS != "qnx") or '
176 '_toolset != "host" or host_os != "mac")', { 255 '_toolset != "host" or host_os != "mac")', {
177 'sources!': ['mac/icudtl_dat.S'], 256 'sources!': ['mac/icudtl_dat.S'],
178 }], 257 }],
179 ], # target_conditions 258 ], # target_conditions
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 }, 687 },
609 'includes': [ 688 'includes': [
610 '../../build/shim_headers.gypi', 689 '../../build/shim_headers.gypi',
611 ], 690 ],
612 'toolsets': ['target'], 691 'toolsets': ['target'],
613 }, 692 },
614 ], # targets 693 ], # targets
615 }], 694 }],
616 ], # conditions 695 ], # conditions
617 } 696 }
OLDNEW
« no previous file with comments | « common/icudtb.dat ('k') | scripts/make_data_assembly.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698