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

Side by Side Diff: build_tools/write_icupkg_inc.py

Issue 1000163003: Generate the icu data binaries at compile time instead of checking in binaries Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: Fixed warnings in cross compiling Created 5 years, 8 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 | « build_tools/write_icudata_lst.py ('k') | build_tools/write_res_index.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 """Writes the icupkg.inc file pkgdata needs to build an object file."""
2
3 from __future__ import print_function
4
5 import argparse
6 import os
7 import sys
8
9
10 def main():
11 parser = argparse.ArgumentParser(
12 description=('Generates an icupkg.inc file to be used by pkgdata.'))
13
14 parser.add_argument('--outfile',
15 required=True,
16 help='File that will contain an ICU formatted list.')
17
18 parser.add_argument('--ver',
19 required=True,
20 help='The ICU version.')
21
22 parser.add_argument('--icu-dir',
23 required=True,
24 help='The directory where icu can be found.')
25
26 args = parser.parse_args()
27
28 with open(args.outfile, "w") as out:
29 out.write("""\
30 GENCCODE_ASSEMBLY_TYPE=-a gcc
31 SO=so
32 SOBJ=so
33 A=a
34 LIBPREFIX=lib
35 LIB_EXT_ORDER=.%(ver)s.1
36 COMPILE=gcc -D_REENTRANT -DU_HAVE_ELF_H=1 -DU_HAVE_ATOMIC=1 -DU_ATTRIBUTE_DEPR ECATED= -O3 -std=c99 -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototy pes -Wwrite-strings -c
37 LIBFLAGS=-I%(icu_dir)s/source/common -DPIC -fPIC
38 GENLIB=gcc -O3 -std=c99 -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prot otypes -Wwrite-strings -shared -Wl,-Bsymbolic
39 LDICUDTFLAGS=-nodefaultlibs -nostdlib
40 LD_SONAME=-Wl,-soname -Wl,
41 RPATH_FLAGS=
42 BIR_LDFLAGS=-Wl,-Bsymbolic
43 AR=ar
44 ARFLAGS=r
45 RANLIB=ranlib
46 INSTALL_CMD=/usr/bin/install -c
47 """ % {
48 'ver': args.ver,
49 'icu_dir': args.icu_dir,
50 })
51
52 if __name__ == '__main__':
53 main()
OLDNEW
« no previous file with comments | « build_tools/write_icudata_lst.py ('k') | build_tools/write_res_index.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698