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

Side by Side Diff: build/common.gypi

Issue 14065005: Introduce arm_version to allow building for armv5, v6 or v7. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review issues Created 7 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/android/envsetup_functions.sh ('k') | skia/skia.gyp » ('j') | 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 Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # IMPORTANT: 5 # IMPORTANT:
6 # Please don't directly include this file if you are building via gyp_chromium, 6 # Please don't directly include this file if you are building via gyp_chromium,
7 # since gyp_chromium is automatically forcing its inclusion. 7 # since gyp_chromium is automatically forcing its inclusion.
8 { 8 {
9 # Variables expected to be overriden on the GYP command line (-D) or by 9 # Variables expected to be overriden on the GYP command line (-D) or by
10 # ~/.gyp/include.gypi. 10 # ~/.gyp/include.gypi.
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 # Disable file manager component extension by default. 205 # Disable file manager component extension by default.
206 'file_manager_extension%': 0, 206 'file_manager_extension%': 0,
207 207
208 # Disable image loader component extension by default. 208 # Disable image loader component extension by default.
209 'image_loader_extension%': 0, 209 'image_loader_extension%': 0,
210 210
211 # Python version. 211 # Python version.
212 'python_ver%': '2.6', 212 'python_ver%': '2.6',
213 213
214 # Set ARM-v7 compilation flags 214 # Set ARM architecture version.
215 'armv7%': 0, 215 'arm_version%': 7,
216 216
217 # Set Neon compilation flags (only meaningful if armv7==1). 217 # Set Neon compilation flags.
218 'arm_neon%': 1, 218 'arm_neon%': 0,
Torne 2013/04/12 12:20:33 Setting this to 0 changes the default config for a
Fredrik Öhrn 2013/04/12 12:58:06 To make it compatible with more devices by default
219 219
220 # The system root for cross-compiles. Default: none. 220 # The system root for cross-compiles. Default: none.
221 'sysroot%': '', 221 'sysroot%': '',
222 222
223 # The system libdir used for this ABI. 223 # The system libdir used for this ABI.
224 'system_libdir%': 'lib', 224 'system_libdir%': 'lib',
225 225
226 # On Linux, we build with sse2 for Chromium builds. 226 # On Linux, we build with sse2 for Chromium builds.
227 'disable_sse2%': 0, 227 'disable_sse2%': 0,
228 228
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 603
604 # Enable Settings App only on Windows. 604 # Enable Settings App only on Windows.
605 ['enable_app_list==1 and OS=="win"', { 605 ['enable_app_list==1 and OS=="win"', {
606 'enable_settings_app%': 1, 606 'enable_settings_app%': 1,
607 }, { 607 }, {
608 'enable_settings_app%': 0, 608 'enable_settings_app%': 0,
609 }], 609 }],
610 610
611 ['OS=="linux" and target_arch=="arm" and chromeos==0', { 611 ['OS=="linux" and target_arch=="arm" and chromeos==0', {
612 # Set some defaults for arm/linux chrome builds 612 # Set some defaults for arm/linux chrome builds
613 'armv7%': 1,
614 'linux_breakpad%': 0, 613 'linux_breakpad%': 0,
615 'linux_use_tcmalloc%': 0, 614 'linux_use_tcmalloc%': 0,
616 # sysroot needs to be an absolute path otherwise it generates 615 # sysroot needs to be an absolute path otherwise it generates
617 # incorrect results when passed to pkg-config 616 # incorrect results when passed to pkg-config
618 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot', 617 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot',
619 }], # OS=="linux" and target_arch=="arm" and chromeos==0 618 }], # OS=="linux" and target_arch=="arm" and chromeos==0
620 619
621 ['target_arch=="mipsel"', { 620 ['target_arch=="mipsel"', {
622 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/sysroot', 621 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/sysroot',
623 'CXX%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/bin/mipsel-linux-gnu -gcc', 622 'CXX%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/bin/mipsel-linux-gnu -gcc',
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 'enable_viewport%': '<(enable_viewport)', 701 'enable_viewport%': '<(enable_viewport)',
703 'enable_hidpi%': '<(enable_hidpi)', 702 'enable_hidpi%': '<(enable_hidpi)',
704 'enable_touch_ui%': '<(enable_touch_ui)', 703 'enable_touch_ui%': '<(enable_touch_ui)',
705 'use_xi2_mt%':'<(use_xi2_mt)', 704 'use_xi2_mt%':'<(use_xi2_mt)',
706 'file_manager_extension%': '<(file_manager_extension)', 705 'file_manager_extension%': '<(file_manager_extension)',
707 'image_loader_extension%': '<(image_loader_extension)', 706 'image_loader_extension%': '<(image_loader_extension)',
708 'inside_chromium_build%': '<(inside_chromium_build)', 707 'inside_chromium_build%': '<(inside_chromium_build)',
709 'fastbuild%': '<(fastbuild)', 708 'fastbuild%': '<(fastbuild)',
710 'dcheck_always_on%': '<(dcheck_always_on)', 709 'dcheck_always_on%': '<(dcheck_always_on)',
711 'python_ver%': '<(python_ver)', 710 'python_ver%': '<(python_ver)',
712 'armv7%': '<(armv7)', 711 'arm_version%': '<(arm_version)',
713 'arm_neon%': '<(arm_neon)', 712 'arm_neon%': '<(arm_neon)',
714 'sysroot%': '<(sysroot)', 713 'sysroot%': '<(sysroot)',
715 'system_libdir%': '<(system_libdir)', 714 'system_libdir%': '<(system_libdir)',
716 'component%': '<(component)', 715 'component%': '<(component)',
717 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)', 716 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
718 'use_third_party_translations%': '<(use_third_party_translations)', 717 'use_third_party_translations%': '<(use_third_party_translations)',
719 'remoting%': '<(remoting)', 718 'remoting%': '<(remoting)',
720 'enable_one_click_signin%': '<(enable_one_click_signin)', 719 'enable_one_click_signin%': '<(enable_one_click_signin)',
721 'enable_webrtc%': '<(enable_webrtc)', 720 'enable_webrtc%': '<(enable_webrtc)',
722 'chromium_win_pch%': '<(chromium_win_pch)', 721 'chromium_win_pch%': '<(chromium_win_pch)',
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 918
920 # Disable shadow stack keeping used by heapcheck to unwind the stacks 919 # Disable shadow stack keeping used by heapcheck to unwind the stacks
921 # better. 920 # better.
922 'linux_keep_shadow_stacks%': 0, 921 'linux_keep_shadow_stacks%': 0,
923 922
924 # Set to 1 to link against libgnome-keyring instead of using dlopen(). 923 # Set to 1 to link against libgnome-keyring instead of using dlopen().
925 'linux_link_gnome_keyring%': 0, 924 'linux_link_gnome_keyring%': 0,
926 # Set to 1 to link against gsettings APIs instead of using dlopen(). 925 # Set to 1 to link against gsettings APIs instead of using dlopen().
927 'linux_link_gsettings%': 0, 926 'linux_link_gsettings%': 0,
928 927
929 # Set Thumb compilation flags.
930 'arm_thumb%': 0,
931
932 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
933 # arm_neon==0).
934 'arm_fpu%': 'vfpv3',
935
936 # Set ARM float abi compilation flag.
937 'arm_float_abi%': 'softfp',
938
939 # Enable use of OpenMAX DL FFT routines. 928 # Enable use of OpenMAX DL FFT routines.
940 'use_openmax_dl_fft%': '<(use_openmax_dl_fft)', 929 'use_openmax_dl_fft%': '<(use_openmax_dl_fft)',
941 930
942 # Enable new NPDevice API. 931 # Enable new NPDevice API.
943 'enable_new_npdevice_api%': 0, 932 'enable_new_npdevice_api%': 0,
944 933
945 # Enable EGLImage support in OpenMAX 934 # Enable EGLImage support in OpenMAX
946 'enable_eglimage%': 1, 935 'enable_eglimage%': 1,
947 936
948 # Enable a variable used elsewhere throughout the GYP files to determine 937 # Enable a variable used elsewhere throughout the GYP files to determine
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 # code compilation. 1156 # code compilation.
1168 'conditions': [ 1157 'conditions': [
1169 ['target_arch == "ia32"', { 1158 ['target_arch == "ia32"', {
1170 'android_app_abi%': 'x86', 1159 'android_app_abi%': 'x86',
1171 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gd bserver/gdbserver', 1160 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gd bserver/gdbserver',
1172 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/ arch-x86', 1161 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/ arch-x86',
1173 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/preb uilt/<(host_os)-<(android_host_arch)/bin', 1162 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/preb uilt/<(host_os)-<(android_host_arch)/bin',
1174 }], 1163 }],
1175 ['target_arch=="arm"', { 1164 ['target_arch=="arm"', {
1176 'conditions': [ 1165 'conditions': [
1177 ['armv7==0', { 1166 ['arm_version<7', {
1178 'android_app_abi%': 'armeabi', 1167 'android_app_abi%': 'armeabi',
1179 }, { 1168 }, {
1180 'android_app_abi%': 'armeabi-v7a', 1169 'android_app_abi%': 'armeabi-v7a',
1181 }], 1170 }],
1182 ], 1171 ],
1183 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gd bserver/gdbserver', 1172 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gd bserver/gdbserver',
1184 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/ arch-arm', 1173 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/ arch-arm',
1185 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-an droideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin', 1174 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-an droideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1186 }], 1175 }],
1187 ], 1176 ],
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1586 'win_debug_InlineFunctionExpansion': 0, 1575 'win_debug_InlineFunctionExpansion': 0,
1587 'win_debug_OmitFramePointers': 0, 1576 'win_debug_OmitFramePointers': 0,
1588 # Keep the code under #ifndef NVALGRIND. 1577 # Keep the code under #ifndef NVALGRIND.
1589 'release_valgrind_build': 1, 1578 'release_valgrind_build': 1,
1590 }], 1579 }],
1591 1580
1592 # Enable RLZ on Win, Mac and ChromeOS. 1581 # Enable RLZ on Win, Mac and ChromeOS.
1593 ['branding=="Chrome" and (OS=="win" or OS=="mac" or chromeos==1)', { 1582 ['branding=="Chrome" and (OS=="win" or OS=="mac" or chromeos==1)', {
1594 'enable_rlz%': 1, 1583 'enable_rlz%': 1,
1595 }], 1584 }],
1585
1586 # Set default compiler flags depending on ARM version.
1587 ['arm_version==5', {
1588 # Flags suitable for Android emulator
1589 'arm_arch%': 'armv5te',
1590 'arm_tune%': 'xscale',
1591 'arm_fpu%': '',
1592 'arm_float_abi%': 'soft',
1593 'arm_thumb%': 0,
1594 }],
1595 ['arm_version==6', {
1596 'arm_arch%': 'armv6',
1597 'arm_tune%': '',
1598 'arm_fpu%': '',
1599 'arm_float_abi%': 'soft',
1600 'arm_thumb%': 0,
1601 }],
1602 ['arm_version==7', {
1603 'arm_arch%': 'armv7-a',
1604 'arm_tune%': 'cortex-a8',
1605 'conditions': [
1606 ['arm_neon==1', {
1607 'arm_fpu%': 'neon',
1608 }, {
1609 'arm_fpu%': 'vfpv3-d16',
1610 }],
1611 ],
1612 'arm_float_abi%': 'softfp',
1613 'arm_thumb%': 1,
1614 }],
1615
1616 ['android_webview_build==1', {
Torne 2013/04/12 12:20:33 I'm not sure you can rely on these being executed
Fredrik Öhrn 2013/04/12 12:58:06 Not being able to depend on the execution order fe
1617 # Clear the above defaults, the WebView build gets its cpu-specific
1618 # flags from the Android build system.
1619 'arm_arch%': '',
1620 'arm_tune%': '',
1621 'arm_fpu%': '',
1622 'arm_float_abi%': '',
1623 'arm_thumb%': 0,
1624 }],
1625
1626 # Set armv7 for backward compatibility.
1627 ['arm_version==7', {
1628 'armv7': 1,
1629 }, {
1630 'armv7': 0,
1631 }],
1596 ], 1632 ],
1597 1633
1598 # List of default apps to install in new profiles. The first list contains 1634 # List of default apps to install in new profiles. The first list contains
1599 # the source files as found in svn. The second list, used only for linux, 1635 # the source files as found in svn. The second list, used only for linux,
1600 # contains the destination location for each of the files. When a crx 1636 # contains the destination location for each of the files. When a crx
1601 # is added or removed from the list, the chrome/browser/resources/ 1637 # is added or removed from the list, the chrome/browser/resources/
1602 # default_apps/external_extensions.json file must also be updated. 1638 # default_apps/external_extensions.json file must also be updated.
1603 'default_apps_list': [ 1639 'default_apps_list': [
1604 'browser/resources/default_apps/external_extensions.json', 1640 'browser/resources/default_apps/external_extensions.json',
1605 'browser/resources/default_apps/gmail.crx', 1641 'browser/resources/default_apps/gmail.crx',
(...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after
2786 'target_conditions': [ 2822 'target_conditions': [
2787 ['_toolset=="target"', { 2823 ['_toolset=="target"', {
2788 'cflags_cc': [ 2824 'cflags_cc': [
2789 # The codesourcery arm-2009q3 toolchain warns at that the ABI 2825 # The codesourcery arm-2009q3 toolchain warns at that the ABI
2790 # has changed whenever it encounters a varargs function. This 2826 # has changed whenever it encounters a varargs function. This
2791 # silences those warnings, as they are not helpful and 2827 # silences those warnings, as they are not helpful and
2792 # clutter legitimate warnings. 2828 # clutter legitimate warnings.
2793 '-Wno-abi', 2829 '-Wno-abi',
2794 ], 2830 ],
2795 'conditions': [ 2831 'conditions': [
2796 ['arm_thumb==1 and android_webview_build==0', { 2832 ['arm_arch!=""', {
2833 'cflags': [
2834 '-march=<(arm_arch)',
2835 ],
2836 }],
2837 ['arm_tune!=""', {
2838 'cflags': [
2839 '-mtune=<(arm_tune)',
2840 ],
2841 }],
2842 ['arm_fpu!=""', {
2843 'cflags': [
2844 '-mfpu=<(arm_fpu)',
2845 ],
2846 }],
2847 ['arm_float_abi!=""', {
2848 'cflags': [
2849 '-mfloat-abi=<(arm_float_abi)',
2850 ],
2851 }],
2852 ['arm_thumb==1', {
2797 'cflags': [ 2853 'cflags': [
2798 '-mthumb', 2854 '-mthumb',
2799 ] 2855 ]
2800 }], 2856 }],
2801 ['armv7==1 and android_webview_build==0', {
2802 'cflags': [
2803 '-march=armv7-a',
2804 '-mtune=cortex-a8',
2805 '-mfloat-abi=<(arm_float_abi)',
2806 ],
2807 'conditions': [
2808 ['arm_neon==1', {
2809 'cflags': [ '-mfpu=neon', ],
2810 }, {
2811 'cflags': [ '-mfpu=<(arm_fpu)', ],
2812 }],
2813 ],
2814 }],
2815 ['OS=="android"', { 2857 ['OS=="android"', {
2816 # Most of the following flags are derived from what Android 2858 # Most of the following flags are derived from what Android
2817 # uses by default when building for arm, reference for which 2859 # uses by default when building for arm, reference for which
2818 # can be found in the following file in the Android NDK: 2860 # can be found in the following file in the Android NDK:
2819 # toolchains/arm-linux-androideabi-4.4.3/setup.mk 2861 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
2820 'cflags': [ 2862 'cflags': [
2821 # The tree-sra optimization (scalar replacement for 2863 # The tree-sra optimization (scalar replacement for
2822 # aggregates enabling subsequent optimizations) leads to 2864 # aggregates enabling subsequent optimizations) leads to
2823 # invalid code generation when using the Android NDK's 2865 # invalid code generation when using the Android NDK's
2824 # compiler (r5-r7). This can be verified using 2866 # compiler (r5-r7). This can be verified using
2825 # TestWebKitAPI's WTF.Checked_int8_t test. 2867 # TestWebKitAPI's WTF.Checked_int8_t test.
2826 '-fno-tree-sra', 2868 '-fno-tree-sra',
2827 '-fuse-ld=gold', 2869 '-fuse-ld=gold',
2828 '-Wno-psabi', 2870 '-Wno-psabi',
2829 ], 2871 ],
2830 # Android now supports .relro sections properly. 2872 # Android now supports .relro sections properly.
2831 # NOTE: While these flags enable the generation of .relro 2873 # NOTE: While these flags enable the generation of .relro
2832 # sections, the generated libraries can still be loaded on 2874 # sections, the generated libraries can still be loaded on
2833 # older Android platform versions. 2875 # older Android platform versions.
2834 'ldflags': [ 2876 'ldflags': [
2835 '-Wl,-z,relro', 2877 '-Wl,-z,relro',
2836 '-Wl,-z,now', 2878 '-Wl,-z,now',
2837 '-fuse-ld=gold', 2879 '-fuse-ld=gold',
2838 ], 2880 ],
2839 'conditions': [ 2881 'conditions': [
2840 ['arm_thumb==1 and android_webview_build==0', { 2882 ['arm_thumb==1', {
2841 'cflags': [ '-mthumb-interwork' ], 2883 'cflags': [ '-mthumb-interwork' ],
2842 }], 2884 }],
2843 ['armv7==0 and android_webview_build==0', {
2844 # Flags suitable for Android emulator
2845 'cflags': [
2846 '-march=armv5te',
2847 '-mtune=xscale',
2848 '-msoft-float',
2849 ],
2850 'defines': [
2851 '__ARM_ARCH_5__',
2852 '__ARM_ARCH_5T__',
2853 '__ARM_ARCH_5E__',
2854 '__ARM_ARCH_5TE__',
2855 ],
2856 }],
2857 ['profiling==1', { 2885 ['profiling==1', {
2858 'cflags': [ 2886 'cflags': [
2859 '-marm', # Probably reduntant, but recommend by "perf" docs. 2887 '-marm', # Probably reduntant, but recommend by "perf" docs.
2860 '-mapcs-frame', # Seems required by -fno-omit-frame-po inter. 2888 '-mapcs-frame', # Seems required by -fno-omit-frame-po inter.
2861 ], 2889 ],
2862 }], 2890 }],
2863 ['clang==1', { 2891 ['clang==1', {
2864 'cflags!': [ 2892 'cflags!': [
2865 # Clang does not support the following options. 2893 # Clang does not support the following options.
2866 '-mthumb-interwork', 2894 '-mthumb-interwork',
(...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after
4227 # settings in target dicts. SYMROOT is a special case, because many other 4255 # settings in target dicts. SYMROOT is a special case, because many other
4228 # Xcode variables depend on it, including variables such as 4256 # Xcode variables depend on it, including variables such as
4229 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 4257 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
4230 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 4258 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
4231 # files to appear (when present) in the UI as actual files and not red 4259 # files to appear (when present) in the UI as actual files and not red
4232 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 4260 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
4233 # and therefore SYMROOT, needs to be set at the project level. 4261 # and therefore SYMROOT, needs to be set at the project level.
4234 'SYMROOT': '<(DEPTH)/xcodebuild', 4262 'SYMROOT': '<(DEPTH)/xcodebuild',
4235 }, 4263 },
4236 } 4264 }
OLDNEW
« no previous file with comments | « build/android/envsetup_functions.sh ('k') | skia/skia.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698