Chromium Code Reviews| Index: build/common.gypi |
| =================================================================== |
| --- build/common.gypi (revision 256167) |
| +++ build/common.gypi (working copy) |
| @@ -792,10 +792,10 @@ |
| 'test_isolation_mode%': 'noop', |
| }], |
| # Whether Android ARM or x86 build uses OpenMAX DL FFT. |
| - ['OS=="android" and ((target_arch=="arm" and arm_version >= 7) or target_arch=="ia32") and android_webview_build==0', { |
| - # Currently only supported on Android ARMv7+, or ia32 |
| + ['OS=="android" and ((target_arch=="arm" and arm_version >= 7) or target_arch=="ia32" or target_arch=="x64") and android_webview_build==0', { |
| + # Currently only supported on Android ARMv7+, ia32 or x64 |
| # without webview. When enabled, this will also enable |
| - # WebAudio support on Android ARM and ia32. Default is |
| + # WebAudio support on Android ARM, ia32 and x64. Default is |
| # enabled. Whether WebAudio is actually available depends |
| # on runtime settings and flags. |
| 'use_openmax_dl_fft%': 1, |
| @@ -1298,14 +1298,7 @@ |
| # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that |
| # it takes effect here. |
| ['os_posix==1 and OS!="mac" and OS!="ios" and clang==0 and asan==0 and lsan==0 and tsan==0 and msan==0', { |
| - 'conditions': [ |
| - ['OS=="android"', { |
| - # We directly set the gcc_version since we know what we use. |
| - 'gcc_version%': 46, |
| - }, { |
| - 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)', |
| - }], |
| - ], |
| + 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)', |
|
Torne
2014/03/11 11:15:35
Is this correct? We're forcing gcc 4.6 at present.
rmcilroy
2014/03/11 11:42:19
I think x64 requires 4.8 - is that right Zhenyu?
Zhenyu Liang
2014/03/12 10:27:23
Yeah, we are using gcc 4.8 for x64 porting.
The ch
rmcilroy
2014/03/12 11:04:08
Is there a reason you cannot do:
['OS=="androi
Zhenyu Liang
2014/03/12 11:30:53
I had tried this way initially. It doesn't work. G
rmcilroy
2014/03/12 15:09:53
Are you sure? When I try this myself it seems to
Zhenyu Liang
2014/03/12 18:46:32
Sorry, I misremembered that _toolset is what I tri
|
| }, { |
| 'gcc_version%': 0, |
| }], |
| @@ -1427,6 +1420,12 @@ |
| 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86', |
| 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin', |
| }], |
| + ['target_arch == "x64"', { |
| + 'android_app_abi%': 'x86_64', |
| + 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86_64/gdbserver/gdbserver', |
| + 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-19/arch-x86_64', |
| + 'android_toolchain%': '<(android_ndk_root)/toolchains/x86_64-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', |
| + }], |
| ['target_arch=="arm"', { |
| 'conditions': [ |
| ['arm_version<7', { |
| @@ -1473,6 +1472,9 @@ |
| # Location of the "readelf" binary. |
| 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)', |
| + # GCC version of Android toolchain |
| + 'gcc_version%': '<!(CXX=<(android_toolchain)/*-g++ python <(DEPTH)/build/compiler_version.py)', |
|
rmcilroy
2014/03/11 11:42:19
Why is this required? Isn't it done above?
Zhenyu Liang
2014/03/12 10:27:23
It determines the gcc version of android toolchain
|
| + |
| # Determines whether we should optimize JNI generation at the cost of |
| # breaking assumptions in the build system that when inputs have changed |
| # the outputs should always change as well. This is meant purely for |
| @@ -1736,7 +1738,7 @@ |
| ['use_titlecase_in_grd_files==1', { |
| 'grit_defines': ['-D', 'use_titlecase'], |
| }], |
| - ['OS=="android" and target_arch=="ia32"', { |
| + ['OS=="android" and (target_arch=="ia32" or target_arch=="x64")', { |
| # WebAudio on Android/x86 is disabled by default, unlike |
| # everywhere else, so use appropriate message. |
| 'grit_defines': ['-D', 'use_webaudio_enable_message'], |
| @@ -3259,6 +3261,30 @@ |
| }], |
| ], |
| }], |
| + ['target_arch=="x64"', { |
| + 'target_conditions': [ |
| + ['_toolset=="target"', { |
| + 'conditions': [ |
| + # Use gold linker for Android x64 target. |
| + ['OS=="android"', { |
| + 'cflags': [ |
| + '-fuse-ld=gold', |
| + ], |
| + 'ldflags': [ |
| + '-fuse-ld=gold', |
| + ], |
| + }], |
| + ], |
| + 'cflags': [ |
| + '-m64', |
| + '-march=x86-64', |
| + ], |
| + 'ldflags': [ |
| + '-m64', |
| + ], |
| + }], |
| + ], |
| + }], |
| ['target_arch=="arm"', { |
| 'target_conditions': [ |
| ['_toolset=="target"', { |
| @@ -3892,6 +3918,15 @@ |
| '-target x86-linux-androideabi', |
| ], |
| }], |
| + # Place holder for x64 support, not tested. |
|
rmcilroy
2014/03/11 11:42:19
Add a todo associated with a bug here please (so t
|
| + ['target_arch=="x64"', { |
| + 'cflags': [ |
| + '-target x86_64-linux-androideabi', |
| + ], |
| + 'ldflags': [ |
| + '-target x86_64-linux-androideabi', |
| + ], |
| + }], |
| ], |
| }], |
| ['asan==1', { |
| @@ -4005,7 +4040,6 @@ |
| ['_type=="executable"', { |
| 'ldflags': [ |
| '-Bdynamic', |
| - '-Wl,-dynamic-linker,/system/bin/linker', |
|
rmcilroy
2014/03/11 11:42:19
This should probably be ok, but have you tested th
Zhenyu Liang
2014/03/12 10:27:23
Yes, I had tried with the original ndk in third_pa
|
| '-Wl,--gc-sections', |
| '-Wl,-z,nocopyreloc', |
| # crtbegin_dynamic.o should be the last item in ldflags. |