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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build_tools/write_icupkg_inc.py
diff --git a/build_tools/write_icupkg_inc.py b/build_tools/write_icupkg_inc.py
new file mode 100644
index 0000000000000000000000000000000000000000..cbf841fbb5125a6b367e47b6cd52dbe59763af8f
--- /dev/null
+++ b/build_tools/write_icupkg_inc.py
@@ -0,0 +1,53 @@
+"""Writes the icupkg.inc file pkgdata needs to build an object file."""
+
+from __future__ import print_function
+
+import argparse
+import os
+import sys
+
+
+def main():
+ parser = argparse.ArgumentParser(
+ description=('Generates an icupkg.inc file to be used by pkgdata.'))
+
+ parser.add_argument('--outfile',
+ required=True,
+ help='File that will contain an ICU formatted list.')
+
+ parser.add_argument('--ver',
+ required=True,
+ help='The ICU version.')
+
+ parser.add_argument('--icu-dir',
+ required=True,
+ help='The directory where icu can be found.')
+
+ args = parser.parse_args()
+
+ with open(args.outfile, "w") as out:
+ out.write("""\
+GENCCODE_ASSEMBLY_TYPE=-a gcc
+SO=so
+SOBJ=so
+A=a
+LIBPREFIX=lib
+LIB_EXT_ORDER=.%(ver)s.1
+COMPILE=gcc -D_REENTRANT -DU_HAVE_ELF_H=1 -DU_HAVE_ATOMIC=1 -DU_ATTRIBUTE_DEPRECATED= -O3 -std=c99 -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -c
+LIBFLAGS=-I%(icu_dir)s/source/common -DPIC -fPIC
+GENLIB=gcc -O3 -std=c99 -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -shared -Wl,-Bsymbolic
+LDICUDTFLAGS=-nodefaultlibs -nostdlib
+LD_SONAME=-Wl,-soname -Wl,
+RPATH_FLAGS=
+BIR_LDFLAGS=-Wl,-Bsymbolic
+AR=ar
+ARFLAGS=r
+RANLIB=ranlib
+INSTALL_CMD=/usr/bin/install -c
+""" % {
+ 'ver': args.ver,
+ 'icu_dir': args.icu_dir,
+ })
+
+if __name__ == '__main__':
+ main()
« 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