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

Side by Side Diff: tools/gyp/configurations_android.gypi

Issue 353403004: Fixes Android build by using C++ math header instead of C one. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/simulator_mips.cc ('k') | no next file » | 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 Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a 2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file. 3 # BSD-style license that can be found in the LICENSE file.
4 4
5 # Definitions for building standalone Dart binaries to run on Android. 5 # Definitions for building standalone Dart binaries to run on Android.
6 # This is mostly excerpted from: 6 # This is mostly excerpted from:
7 # http://src.chromium.org/viewvc/chrome/trunk/src/build/common.gypi 7 # http://src.chromium.org/viewvc/chrome/trunk/src/build/common.gypi
8 8
9 { 9 {
10 'variables': { 10 'variables': {
11 'android_ndk_root': '<(PRODUCT_DIR)/../../third_party/android_tools/ndk', 11 'android_ndk_root': '<(PRODUCT_DIR)/../../third_party/android_tools/ndk',
12 }, # variables 12 }, # variables
13 'target_defaults': { 13 'target_defaults': {
14 'configurations': { 14 'configurations': {
15 # It is very important to get the order of the linker arguments correct. 15 # It is very important to get the order of the linker arguments correct.
16 # Therefore, we put them all in the architecture specific configurations, 16 # Therefore, we put them all in the architecture specific configurations,
17 # even though there are many flags in common, to avoid splitting them 17 # even though there are many flags in common, to avoid splitting them
18 # between two configurations and possibly accidentally mixing up the 18 # between two configurations and possibly accidentally mixing up the
19 # order. 19 # order.
20 'Dart_Android_Base': { 20 'Dart_Android_Base': {
21 'abstract': 1, 21 'abstract': 1,
22 'cflags': [ '-Wno-abi', '-Wall', '-W', '-Wno-unused-parameter', 22 'cflags': [ '-Wno-abi', '-Wall', '-W', '-Wno-unused-parameter',
23 '-Wnon-virtual-dtor', '-fno-rtti', '-fno-exceptions',], 23 '-Wnon-virtual-dtor', '-fno-rtti', '-fno-exceptions',],
24 'target_conditions': [ 24 'target_conditions': [
25 ['_toolset=="target"', { 25 ['_toolset=="target"', {
26 'defines': [ 26 'defines': [
27 'ANDROID', 27 'ANDROID',
28 'USE_STLPORT=1', 28 'USE_STLPORT=1',
29 '__GNU_SOURCE=1',
29 '_STLP_USE_PTR_SPECIALIZATIONS=1', 30 '_STLP_USE_PTR_SPECIALIZATIONS=1',
30 '_STLP_NO_CSTD_FUNCTION_IMPORTS=1',
31 'HAVE_OFF64_T', 31 'HAVE_OFF64_T',
32 'HAVE_SYS_UIO_H', 32 'HAVE_SYS_UIO_H',
33 ], 33 ],
34 'cflags!': [ 34 'cflags!': [
35 '-pthread', # Not supported by Android toolchain. 35 '-pthread', # Not supported by Android toolchain.
36 ], 36 ],
37 'cflags': [ 37 'cflags': [
38 '-U__linux__', # Don't allow toolchain to claim -D__linux__ 38 '-U__linux__', # Don't allow toolchain to claim -D__linux__
39 '-ffunction-sections', 39 '-ffunction-sections',
40 '-funwind-tables', 40 '-funwind-tables',
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 'android_ndk_include': '<(android_sysroot)/usr/include', 79 'android_ndk_include': '<(android_sysroot)/usr/include',
80 'android_ndk_lib': '<(android_sysroot)/usr/lib', 80 'android_ndk_lib': '<(android_sysroot)/usr/lib',
81 }, 81 },
82 'target_conditions': [ 82 'target_conditions': [
83 ['_toolset=="target"', { 83 ['_toolset=="target"', {
84 # The x86 toolchain currently has problems with stack-protector. 84 # The x86 toolchain currently has problems with stack-protector.
85 'cflags!': [ 85 'cflags!': [
86 '-fstack-protector', 86 '-fstack-protector',
87 ], 87 ],
88 'cflags': [ 88 'cflags': [
89 '--sysroot=<(android_sysroot)',
89 '-I<(android_ndk_include)', 90 '-I<(android_ndk_include)',
90 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport', 91 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
91 '-fno-stack-protector', 92 '-fno-stack-protector',
92 ], 93 ],
93 'target_conditions': [ 94 'target_conditions': [
94 ['_type=="executable"', { 95 ['_type=="executable"', {
95 'ldflags!': ['-Wl,--exclude-libs=ALL,-shared',], 96 'ldflags!': ['-Wl,--exclude-libs=ALL,-shared',],
96 }], 97 }],
97 ['_type=="shared_library"', { 98 ['_type=="shared_library"', {
98 'ldflags': ['-Wl,-shared,-Bsymbolic',], 99 'ldflags': ['-Wl,-shared,-Bsymbolic',],
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 'Dart_Android_arm_Base': { 135 'Dart_Android_arm_Base': {
135 'abstract': 1, 136 'abstract': 1,
136 'variables': { 137 'variables': {
137 'android_sysroot': '<(android_ndk_root)/platforms/android-14/arch-arm' , 138 'android_sysroot': '<(android_ndk_root)/platforms/android-14/arch-arm' ,
138 'android_ndk_include': '<(android_sysroot)/usr/include', 139 'android_ndk_include': '<(android_sysroot)/usr/include',
139 'android_ndk_lib': '<(android_sysroot)/usr/lib', 140 'android_ndk_lib': '<(android_sysroot)/usr/lib',
140 }, 141 },
141 'target_conditions': [ 142 'target_conditions': [
142 ['_toolset=="target"', { 143 ['_toolset=="target"', {
143 'cflags': [ 144 'cflags': [
145 '--sysroot=<(android_sysroot)',
144 '-I<(android_ndk_include)', 146 '-I<(android_ndk_include)',
145 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport', 147 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
146 '-march=armv7-a', 148 '-march=armv7-a',
147 '-mtune=cortex-a8', 149 '-mtune=cortex-a8',
148 '-mfpu=vfp3', 150 '-mfpu=vfp3',
149 '-mfloat-abi=softfp', 151 '-mfloat-abi=softfp',
150 ], 152 ],
151 'target_conditions': [ 153 'target_conditions': [
152 ['_type=="executable"', { 154 ['_type=="executable"', {
153 'ldflags!': ['-Wl,--exclude-libs=ALL,-shared',], 155 'ldflags!': ['-Wl,--exclude-libs=ALL,-shared',],
(...skipping 27 matching lines...) Expand all
181 ], 183 ],
182 }], 184 }],
183 ['_toolset=="host"', { 185 ['_toolset=="host"', {
184 'ldflags': [ '-m32', '-pthread' ], 186 'ldflags': [ '-m32', '-pthread' ],
185 }], 187 }],
186 ], 188 ],
187 }, 189 },
188 }, # configurations 190 }, # configurations
189 }, # target_defaults 191 }, # target_defaults
190 } 192 }
OLDNEW
« no previous file with comments | « runtime/vm/simulator_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698