Codebase list mozc / 5ce7fa6
Switch NDK from r10e to r12b This CL completely removes --android_compiler option since we now only support Clang toolchain for Android target binaries. GCC toolchain bundled in Android NDK is going to be deprecated shortly [1]. This Cl also adds following build targets on Travis-CI. - Android (arm64) - Android (x86) - Android (x86_64) - Android (mips) - Android (mips64) Closes #273. [1]: https://android.googlesource.com/platform/ndk.git/+/fb83ea8bf716ef262ca9f03b2102ebcbb147b38a BUG=#273 TEST=compile REF_BUG= REF_CL=131555947,133352265,134314373 REF_TIME=2016-08-28T22:29:30-07:00 REF_TIME_RAW=1472448570 -0700 Yohei Yukawa 7 years ago
7 changed file(s) with 59 addition(s) and 114 deletion(s). Raw diff Collapse all Expand all
3838 compiler: clang
3939
4040 env:
41 - TARGET_PLATFORM=Android
41 - TARGET_PLATFORM=Android_arm
42 - TARGET_PLATFORM=Android_arm64
43 - TARGET_PLATFORM=Android_x86
44 - TARGET_PLATFORM=Android_x86_64
45 - TARGET_PLATFORM=Android_mips
46 - TARGET_PLATFORM=Android_mips64
4247 - TARGET_PLATFORM=Linux
4348 - TARGET_PLATFORM=NaCl
4449 - TARGET_PLATFORM=Mac
4853 - if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get install -y clang python pkg-config curl bzip2 unzip make; fi
4954 - if [ $TARGET_PLATFORM == Linux ]; then sudo apt-get install -y libibus-1.0-dev libglib2.0-dev libqt4-dev libgtk2.0-dev libxcb-xfixes0-dev; fi
5055 - if [ $TARGET_PLATFORM == NaCl ]; then sudo apt-get install -y libc6-i386 lib32stdc++6; fi
51 - if [ $TARGET_PLATFORM == Android ]; then sudo apt-get install --no-install-recommends openjdk-7-jdk openjdk-7-jre-headless libjsr305-java ant zip libc6-i386 lib32stdc++6 lib32ncurses5 lib32z1; fi
56 - if [ ${TARGET_PLATFORM:0:7} == Android ]; then sudo apt-get install --no-install-recommends openjdk-7-jdk openjdk-7-jre-headless libjsr305-java ant zip libc6-i386 lib32stdc++6 lib32ncurses5 lib32z1; fi
5257
5358 install:
5459 - if [ $TRAVIS_OS_NAME == linux ]; then git -C src/third_party clone https://chromium.googlesource.com/chromium/tools/depot_tools.git; fi
5863 - if [ $TARGET_PLATFORM == Mac ]; then git -C src/third_party clone https://chromium.googlesource.com/chromium/tools/depot_tools.git; fi
5964 - if [ $TARGET_PLATFORM == Mac ]; then export PATH="$PATH":`pwd`/src/third_party/depot_tools; fi
6065 - if [ $TARGET_PLATFORM == NaCl ]; then cd src/third_party && curl -LO http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip && unzip nacl_sdk.zip && rm nacl_sdk.zip && cd nacl_sdk && ./naclsdk install pepper_45 && cd ../../../; fi
61 - if [ $TARGET_PLATFORM == Android ]; then jdk_switcher use openjdk7; fi
62 - if [ $TARGET_PLATFORM == Android ]; then cd src/third_party && curl -L http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin -O && chmod u+x android-ndk-r10e-linux-x86_64.bin && ./android-ndk-r10e-linux-x86_64.bin > /dev/null && rm android-ndk-r10e-linux-x86_64.bin && curl -L http://dl.google.com/android/android-sdk_r24.1.2-linux.tgz | tar -zx && cd ../../; fi
63 - if [ $TARGET_PLATFORM == Android ]; then export ANDROID_NDK_HOME=`pwd`/src/third_party/android-ndk-r10e ; fi
64 - if [ $TARGET_PLATFORM == Android ]; then export ANDROID_HOME=`pwd`/src/third_party/android-sdk-linux ; fi
65 - if [ $TARGET_PLATFORM == Android ]; then export PATH="$PATH":${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${ANDROID_NDK_HOME}; fi
66 - if [ $TARGET_PLATFORM == Android ]; then echo y | android update sdk --all --force --no-ui --filter android-22; fi
67 - if [ $TARGET_PLATFORM == Android ]; then echo y | android update sdk --all --force --no-ui --filter build-tools-22.0.0; fi
68 - if [ $TARGET_PLATFORM == Android ]; then echo y | android update sdk --all --force --no-ui --filter extra-android-support; fi
69 - if [ $TARGET_PLATFORM == Android ]; then echo y | android update sdk --all --force --no-ui --filter platform-tool; fi
66 - if [ ${TARGET_PLATFORM:0:7} == Android ]; then jdk_switcher use openjdk7; fi
67 - if [ ${TARGET_PLATFORM:0:7} == Android ]; then cd src/third_party && curl -LO http://dl.google.com/android/repository/android-ndk-r12b-linux-x86_64.zip && unzip -q android-ndk-r12b-linux-x86_64.zip && rm android-ndk-r12b-linux-x86_64.zip && curl -L http://dl.google.com/android/android-sdk_r24.1.2-linux.tgz | tar -zx && cd ../../; fi
68 - if [ ${TARGET_PLATFORM:0:7} == Android ]; then export ANDROID_NDK_HOME=`pwd`/src/third_party/android-ndk-r12b ; fi
69 - if [ ${TARGET_PLATFORM:0:7} == Android ]; then export ANDROID_HOME=`pwd`/src/third_party/android-sdk-linux ; fi
70 - if [ ${TARGET_PLATFORM:0:7} == Android ]; then export PATH="$PATH":${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${ANDROID_NDK_HOME}; fi
71 - if [ ${TARGET_PLATFORM:0:7} == Android ]; then echo y | android update sdk --all --force --no-ui --filter android-22; fi
72 - if [ ${TARGET_PLATFORM:0:7} == Android ]; then echo y | android update sdk --all --force --no-ui --filter build-tools-22.0.0; fi
73 - if [ ${TARGET_PLATFORM:0:7} == Android ]; then echo y | android update sdk --all --force --no-ui --filter extra-android-support; fi
74 - if [ ${TARGET_PLATFORM:0:7} == Android ]; then echo y | android update sdk --all --force --no-ui --filter platform-tool; fi
7075
7176 script:
7277 - cd ./src
73 - if [ $TARGET_PLATFORM == Android ]; then python build_mozc.py gyp --target_platform=Android; fi
74 - if [ $TARGET_PLATFORM == Android ]; then python build_mozc.py build -c Release package; fi
78 - if [ ${TARGET_PLATFORM:0:7} == Android ]; then python build_mozc.py gyp --target_platform=Android --android_arch=${TARGET_PLATFORM:8:6}; fi
79 - if [ ${TARGET_PLATFORM:0:7} == Android ]; then python build_mozc.py build -c Release package; fi
7580 - if [ $TARGET_PLATFORM == Linux ]; then python build_mozc.py gyp --target_platform=Linux; fi
7681 - if [ $TARGET_PLATFORM == Linux ]; then python build_mozc.py build -c Release package; fi
7782 - if [ $TARGET_PLATFORM == Linux ]; then python build_mozc.py runtests -c Release; fi
8691 - os: linux
8792 env: TARGET_PLATFORM=Mac
8893 - os: osx
89 env: TARGET_PLATFORM=Android
94 env: TARGET_PLATFORM=Android_arm
95 - os: osx
96 env: TARGET_PLATFORM=Android_arm64
97 - os: osx
98 env: TARGET_PLATFORM=Android_x86
99 - os: osx
100 env: TARGET_PLATFORM=Android_x86_64
101 - os: osx
102 env: TARGET_PLATFORM=Android_mips
103 - os: osx
104 env: TARGET_PLATFORM=Android_mips64
90105 - os: osx
91106 env: TARGET_PLATFORM=Linux
92107 - os: osx
5252 WORKDIR /home/mozc_builder/work
5353
5454 ## Android SDK/NDK
55 RUN curl -L http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin -O && chmod u+x android-ndk-r10e-linux-x86_64.bin && ./android-ndk-r10e-linux-x86_64.bin && rm android-ndk-r10e-linux-x86_64.bin
55 RUN curl -LO http://dl.google.com/android/repository/android-ndk-r12b-linux-x86_64.zip && unzip android-ndk-r12b-linux-x86_64.zip && rm android-ndk-r12b-linux-x86_64.zip
5656 RUN curl -L http://dl.google.com/android/android-sdk_r24.1.2-linux.tgz | tar -zx
57 ENV ANDROID_NDK_HOME /home/mozc_builder/work/android-ndk-r10e
57 ENV ANDROID_NDK_HOME /home/mozc_builder/work/android-ndk-r12b
5858 ENV ANDROID_HOME /home/mozc_builder/work/android-sdk-linux
5959 ENV PATH $PATH:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${ANDROID_NDK_HOME}
6060 RUN echo y | android update sdk --all --force --no-ui --filter android-22
233233 'type': 'none',
234234 'variables': {
235235 'make_standalone_toolchain_commands': [
236 'bash',
237 '<(android_ndk_home)/build/tools/make-standalone-toolchain.sh',
238 '--toolchain=<(toolchain)',
239 '--stl=libcxx',
236 'python',
237 '<(android_ndk_home)/build/tools/make_standalone_toolchain.py',
238 '--force',
239 '--arch=<(android_arch)',
240 '--stl=libc++',
240241 '--install-dir=<(mozc_build_tools_dir)/ndk-standalone-toolchain/<(android_arch)',
241 '--platform=<(platform)',
242 '--api=<(ndk_target_api_level)',
242243 ],
243244 'make_standalone_toolchain_result': '<!(<(make_standalone_toolchain_commands))',
244245 },
8282 'font_dir': '<(third_party_dir)/noto_font',
8383 },
8484 }],
85 ['android_arch=="arm" and android_compiler=="gcc"', {
85 ['android_arch=="arm"', {
8686 'variables': {
8787 'abi': 'armeabi-v7a',
88 'toolchain': 'arm-linux-androideabi-4.9',
89 'platform': 'android-14',
88 'ndk_target_api_level': '14',
9089 },
9190 }],
92 ['android_arch=="arm" and android_compiler=="clang"', {
91 ['android_arch=="x86"', {
9392 'variables': {
94 'abi': 'armeabi-v7a',
95 'toolchain': 'arm-linux-androideabi-clang3.5',
96 'platform': 'android-14',
93 'abi': 'x86',
94 'ndk_target_api_level': '14',
9795 },
9896 }],
99 ['android_arch=="x86" and android_compiler=="gcc"', {
97 ['android_arch=="mips"', {
10098 'variables': {
101 'abi': 'x86',
102 'toolchain': 'x86-4.9',
103 'platform': 'android-14',
99 'abi': 'mips',
100 'ndk_target_api_level': '14',
104101 },
105102 }],
106 ['android_arch=="x86" and android_compiler=="clang"', {
103 ['android_arch=="arm64"', {
107104 'variables': {
108 'abi': 'x86',
109 'toolchain': 'x86-clang3.5',
110 'platform': 'android-14',
105 'abi': 'arm64-v8a',
106 'ndk_target_api_level': '21',
111107 },
112108 }],
113 ['android_arch=="mips" and android_compiler=="gcc"', {
109 ['android_arch=="x86_64"', {
114110 'variables': {
115 'abi': 'mips',
116 'toolchain': 'mipsel-linux-android-4.9',
117 'platform': 'android-14',
111 'abi': 'x86_64',
112 'ndk_target_api_level': '21',
118113 },
119114 }],
120 ['android_arch=="mips" and android_compiler=="clang"', {
121 'variables': {
122 'abi': 'mips',
123 'toolchain': 'mipsel-linux-android-clang3.5',
124 'platform': 'android-14',
125 },
126 }],
127 ['android_arch=="arm64" and android_compiler=="gcc"', {
128 'variables': {
129 'abi': 'arm64-v8a',
130 'toolchain': 'aarch64-linux-android-4.9',
131 'platform': 'android-21',
132 },
133 }],
134 ['android_arch=="arm64" and android_compiler=="clang"', {
135 'variables': {
136 'abi': 'arm64-v8a',
137 'toolchain': 'aarch64-linux-android-clang3.5',
138 'platform': 'android-21',
139 },
140 }],
141 ['android_arch=="x86_64" and android_compiler=="gcc"', {
142 'variables': {
143 'abi': 'x86_64',
144 'toolchain': 'x86_64-4.9',
145 'platform': 'android-21',
146 },
147 }],
148 ['android_arch=="x86_64" and android_compiler=="clang"', {
149 'variables': {
150 'abi': 'x86_64',
151 'toolchain': 'x86_64-clang3.5',
152 'platform': 'android-21',
153 },
154 }],
155 ['android_arch=="mips64" and android_compiler=="gcc"', {
115 ['android_arch=="mips64"', {
156116 'variables': {
157117 'abi': 'mips64',
158 'toolchain': 'mips64el-linux-android-4.9',
159 'platform': 'android-21',
160 },
161 }],
162 ['android_arch=="mips64" and android_compiler=="clang"', {
163 'variables': {
164 'abi': 'mips64',
165 'toolchain': 'mips64el-linux-android-4.9',
166 'platform': 'android-21',
118 'ndk_target_api_level': '21',
167119 },
168120 }],
169121 ],
296296 default='arm',
297297 help='[Android build only] Android architecture '
298298 '(arm, x86, mips)')
299 parser.add_option('--android_compiler', dest='android_compiler',
300 type='choice',
301 choices=('gcc', 'clang'),
302 default='gcc',
303 help='[Android build only] Compiler')
304299 parser.add_option('--android_application_id', dest='android_application_id',
305300 default='org.mozc.android.inputmethod.japanese',
306301 help='[Android build only] Android\'s application id'
641636
642637 gyp_options.extend(['-D', 'android_home=%s' % android_home])
643638 gyp_options.extend(['-D', 'android_arch=%s' % options.android_arch])
644 gyp_options.extend(['-D', 'android_compiler=%s' % options.android_compiler])
645639 gyp_options.extend(['-D', 'android_ndk_home=%s' % android_ndk_home])
646640 gyp_options.extend(['-D', 'android_application_id=%s' %
647641 options.android_application_id])
2929
3030 MAJOR=2
3131 MINOR=18
32 BUILD=2598
32 BUILD=2599
3333 REVISION=102
3434 # This version represents the version of Mozc IME engine (converter, predictor,
3535 # etc.). This version info is included both in the Mozc server and in the Mozc
114114 'compiler_host': 'clang',
115115 'compiler_host_version_int': 303, # Clang 3.3 or higher
116116 }],
117 ['target_platform=="Android" and android_compiler=="clang"', {
117 ['target_platform=="Android"', {
118118 'compiler_target': 'clang',
119 'compiler_target_version_int': 305, # Clang 3.5 or higher
120 'compiler_host': 'clang',
121 'compiler_host_version_int': 304, # Clang 3.4 or higher
122 }],
123 ['target_platform=="Android" and android_compiler=="gcc"', {
124 'compiler_target': 'gcc',
125 'compiler_target_version_int': 409, # GCC 4.9 or higher
119 'compiler_target_version_int': 308, # Clang 3.8 or higher
126120 'compiler_host': 'clang',
127121 'compiler_host_version_int': 304, # Clang 3.4 or higher
128122 }],
311305 ],
312306 'ldflags': [
313307 '-llog',
308 '-static-libstdc++',
314309 ],
315310 'conditions': [
316311 ['android_arch=="arm"', {
493488 'toolchain_prefix': 'mips64el-linux-android',
494489 },
495490 }],
496 ['android_compiler=="gcc"', {
497 'variables': {
498 'c_compiler': 'gcc',
499 'cxx_compiler': 'g++',
500 }
501 }],
502 ['android_compiler=="clang"', {
503 'variables': {
504 'c_compiler': 'clang',
505 'cxx_compiler': 'clang++',
506 }
507 }],
508491 ],
509492 # To use clang only CC and CXX should point clang directly.
510493 # c.f., https://android.googlesource.com/platform/ndk/+/tools_ndk_r9d/docs/text/STANDALONE-TOOLCHAIN.text
511494 'make_global_settings': [
512495 ['AR', '<(ndk_bin_dir)/<(toolchain_prefix)-ar'],
513 ['CC', '<(ndk_bin_dir)/<(toolchain_prefix)-<(c_compiler)'],
514 ['CXX', '<(ndk_bin_dir)/<(toolchain_prefix)-<(cxx_compiler)'],
496 ['CC', '<(ndk_bin_dir)/<(toolchain_prefix)-clang'],
497 ['CXX', '<(ndk_bin_dir)/<(toolchain_prefix)-clang++'],
515498 ['LD', '<(ndk_bin_dir)/<(toolchain_prefix)-ld'],
516499 ['NM', '<(ndk_bin_dir)/<(toolchain_prefix)-nm'],
517500 ['READELF', '<(ndk_bin_dir)/<(toolchain_prefix)-readelf'],