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

Side by Side Diff: build/common.gypi

Issue 10808042: [Android] Add remaining build/common.gypi changes from downstream. (Closed) Base URL: http://git.chromium.org/chromium/src.git@media
Patch Set: add crbug Created 8 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
« no previous file with comments | « no previous file | 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 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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 ['target_arch=="arm" and armv7==1', { 890 ['target_arch=="arm" and armv7==1', {
891 'android_app_abi%': 'armeabi-v7a', 891 'android_app_abi%': 'armeabi-v7a',
892 }], 892 }],
893 ], 893 ],
894 894
895 # Switch between different build types, currently only '0' is 895 # Switch between different build types, currently only '0' is
896 # supported. 896 # supported.
897 'android_build_type%': 0, 897 'android_build_type%': 0,
898 }, 898 },
899 'android_ndk_root%': '<(android_ndk_root)', 899 'android_ndk_root%': '<(android_ndk_root)',
900 'android_ndk_sysroot': '<(android_ndk_root)/platforms/android-9/arch-< (target_arch)', 900 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-9/arch- <(target_arch)',
901 'android_build_type%': '<(android_build_type)', 901 'android_build_type%': '<(android_build_type)',
902 'android_app_abi%': '<(android_app_abi)', 902 'android_app_abi%': '<(android_app_abi)',
903 }, 903 },
904 'android_ndk_root%': '<(android_ndk_root)', 904 'android_ndk_root%': '<(android_ndk_root)',
905 'android_ndk_sysroot': '<(android_ndk_sysroot)', 905 'android_ndk_sysroot': '<(android_ndk_sysroot)',
906 'android_ndk_include': '<(android_ndk_sysroot)/usr/include', 906 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
907 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib', 907 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
908 'android_app_abi%': '<(android_app_abi)', 908 'android_app_abi%': '<(android_app_abi)',
909 909
910 # Provides an absolute path to PRODUCT_DIR (e.g. out/Release). Used 910 # Provides an absolute path to PRODUCT_DIR (e.g. out/Release). Used
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 'use_libffmpeg%': '0', 956 'use_libffmpeg%': '0',
957 957
958 # Always use the chromium skia. The use_system_harfbuzz needs to 958 # Always use the chromium skia. The use_system_harfbuzz needs to
959 # match use_system_skia. 959 # match use_system_skia.
960 'use_system_skia%': '0', 960 'use_system_skia%': '0',
961 'use_system_harfbuzz%': '0', 961 'use_system_harfbuzz%': '0',
962 962
963 # Always use the system zlib. 963 # Always use the system zlib.
964 'use_system_zlib%': 1, 964 'use_system_zlib%': 1,
965 965
966 # Configure crash reporting and build options based on release type.
966 'conditions': [ 967 'conditions': [
967 # Determine whether or not to use breakpad crash reporting for native
968 # code. Java code stacktraces will be collected by GoogleFeedback when
969 # chrome is installed by either market or bazaar where the installer
970 # package is automatically set to AndroidFeedback.
971 ['buildtype=="Official"', { 968 ['buildtype=="Official"', {
969 # Only report crash dumps for Official builds.
972 'linux_breakpad%': 1, 970 'linux_breakpad%': 1,
971 'defines': [
972 # Silence NOTIMPLEMENTED()s on Official builds.
973 'NOTIMPLEMENTED_POLICY=0'
Mark Mentovai 2012/07/20 02:11:46 Can you make this change in logging.h or wherever
974 ],
973 }, { 975 }, {
974 'linux_breakpad%': 0, 976 'linux_breakpad%': 0,
975 }], 977 }],
976 ], 978 ],
977 979
978 # TODO(steveblock): Investigate using the system versions of sqlite and 980 # TODO(steveblock): Investigate using the system versions of sqlite and
979 # libjpeg. 981 # libjpeg.
980 # Enable to use system sqlite. 982 # Enable to use system sqlite.
981 'use_system_sqlite%': 0, # '<(android_build_type)', 983 'use_system_sqlite%': 0, # '<(android_build_type)',
982 # Enable to use system libjpeg. 984 # Enable to use system libjpeg.
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
2183 'conditions': [ 2185 'conditions': [
2184 ['arm_thumb==1', { 2186 ['arm_thumb==1', {
2185 'cflags': [ 2187 'cflags': [
2186 '-mthumb', 2188 '-mthumb',
2187 ] 2189 ]
2188 }], 2190 }],
2189 ['armv7==1', { 2191 ['armv7==1', {
2190 'cflags': [ 2192 'cflags': [
2191 '-march=armv7-a', 2193 '-march=armv7-a',
2192 '-mtune=cortex-a8', 2194 '-mtune=cortex-a8',
2193 '-mfloat-abi=<(arm_float_abi)',
2194 ], 2195 ],
2195 'conditions': [ 2196 'conditions': [
2196 ['arm_neon==1', { 2197 ['arm_neon==1', {
2197 'cflags': [ '-mfpu=neon', ], 2198 'cflags': [ '-mfpu=neon', ],
2198 }, { 2199 }, {
2199 'cflags': [ '-mfpu=<(arm_fpu)', ], 2200 'cflags': [ '-mfpu=<(arm_fpu)', ],
2201 }],
2202 ['clang==1', {
2203 'cflags': [ '-mfloat-abi=soft', ],
2204 'cflags!': [
2205 # -mfpu handling in Clang is broken.
2206 '-mfpu=neon',
2207 '-mfpu=<(arm_fpu)',
2208 # Clang does not support the following options.
2209 '-mthumb-interwork',
2210 '-finline-limit=64',
2211 '-fno-tree-sra',
2212 '-Wno-psabi',
2213 ],
2214 }, {
2215 'cflags': [ '-mfloat-abi=softfp', ],
2200 }] 2216 }]
2201 ], 2217 ],
2202 }], 2218 }],
2203 ['OS=="android"', { 2219 ['OS=="android"', {
2204 # Most of the following flags are derived from what Android 2220 # Most of the following flags are derived from what Android
2205 # uses by default when building for arm, reference for which 2221 # uses by default when building for arm, reference for which
2206 # can be found in the following file in the Android NDK: 2222 # can be found in the following file in the Android NDK:
2207 # toolchains/arm-linux-androideabi-4.4.3/setup.mk 2223 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
2208 'cflags': [ 2224 'cflags': [
2209 # The tree-sra optimization (scalar replacement for 2225 # The tree-sra optimization (scalar replacement for
2210 # aggregates enabling subsequent optimizations) leads to 2226 # aggregates enabling subsequent optimizations) leads to
2211 # invalid code generation when using the Android NDK's 2227 # invalid code generation when using the Android NDK's
2212 # compiler (r5-r7). This can be verified using 2228 # compiler (r5-r7). This can be verified using
2213 # TestWebKitAPI's WTF.Checked_int8_t test. 2229 # TestWebKitAPI's WTF.Checked_int8_t test.
2214 '-fno-tree-sra', 2230 '-fno-tree-sra',
2215 '-Wno-psabi', 2231 '-Wno-psabi',
2216 ], 2232 ],
2233 'cflags_cc': [
2234 # TODO(beverloo): WebKit warns about using the "nullptr"
2235 # identifier in NullPtr.h, which actually is valid usage.
2236 # We should remove this flag once we know why the warning
2237 # suddenly shows up on JellyBean. (crbug/138166)
2238 '-Wno-c++0x-compat',
2239 ],
2217 # Android now supports .relro sections properly. 2240 # Android now supports .relro sections properly.
2218 # NOTE: While these flags enable the generation of .relro 2241 # NOTE: While these flags enable the generation of .relro
2219 # sections, the generated libraries can still be loaded on 2242 # sections, the generated libraries can still be loaded on
2220 # older Android platform versions. 2243 # older Android platform versions.
2221 'ldflags': [ 2244 'ldflags': [
2222 '-Wl,-z,relro', 2245 '-Wl,-z,relro',
2223 '-Wl,-z,now', 2246 '-Wl,-z,now',
2224 ], 2247 ],
2225 'conditions': [ 2248 'conditions': [
2226 ['arm_thumb == 1', { 2249 ['arm_thumb == 1', {
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
2508 # libgcc.a to the start of libraries which puts it in the 2531 # libgcc.a to the start of libraries which puts it in the
2509 # proper spot after .o and .a files get linked in. 2532 # proper spot after .o and .a files get linked in.
2510 # 2533 #
2511 # TODO: The proper thing to do longer-tem would be proper gyp 2534 # TODO: The proper thing to do longer-tem would be proper gyp
2512 # support for a custom link command line. 2535 # support for a custom link command line.
2513 ['_toolset=="target"', { 2536 ['_toolset=="target"', {
2514 'cflags!': [ 2537 'cflags!': [
2515 '-pthread', # Not supported by Android toolchain. 2538 '-pthread', # Not supported by Android toolchain.
2516 ], 2539 ],
2517 'cflags': [ 2540 'cflags': [
2518 '-U__linux__', # Don't allow toolchain to claim -D__linux__
2519 '-ffunction-sections', 2541 '-ffunction-sections',
2520 '-funwind-tables', 2542 '-funwind-tables',
2521 '-g', 2543 '-g',
2522 '-fstack-protector', 2544 '-fstack-protector',
2523 '-fno-short-enums', 2545 '-fno-short-enums',
2524 '-finline-limit=64', 2546 '-finline-limit=64',
2525 '-Wa,--noexecstack', 2547 '-Wa,--noexecstack',
2526 '-Wno-error=non-virtual-dtor', # TODO(michaelbai): Fix warnings.
2527 '<@(release_extra_cflags)', 2548 '<@(release_extra_cflags)',
2528 # Note: This include is in cflags to ensure that it comes after
2529 # all of the includes.
2530 '-I<(android_ndk_include)',
2531 ], 2549 ],
2532 'defines': [ 2550 'defines': [
2533 'ANDROID', 2551 'ANDROID',
2534 '__GNU_SOURCE=1', # Necessary for clone() 2552 '__GNU_SOURCE=1', # Necessary for clone()
2535 'USE_STLPORT=1', 2553 'USE_STLPORT=1',
2536 '_STLP_USE_PTR_SPECIALIZATIONS=1', 2554 '_STLP_USE_PTR_SPECIALIZATIONS=1',
2537 'HAVE_SYS_UIO_H',
2538 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize .
2539 ], 2555 ],
2540 'ldflags!': [ 2556 'ldflags!': [
2541 '-pthread', # Not supported by Android toolchain. 2557 '-pthread', # Not supported by Android toolchain.
2542 ], 2558 ],
2543 'ldflags': [ 2559 'ldflags': [
2544 '-nostdlib', 2560 '-nostdlib',
2545 '-Wl,--no-undefined', 2561 '-Wl,--no-undefined',
2546 # Don't export symbols from statically linked libraries. 2562 # Don't export symbols from statically linked libraries.
2547 '-Wl,--exclude-libs=ALL', 2563 '-Wl,--exclude-libs=ALL',
2548 ], 2564 ],
2549 'libraries': [ 2565 'libraries': [
2550 '-l<(android_stlport_library)', 2566 '-l<(android_stlport_library)',
2551 # Manually link the libgcc.a that the cross compiler uses. 2567 # Manually link the libgcc.a that the cross compiler uses.
2552 '<!(${ANDROID_TOOLCHAIN}/*-gcc -print-libgcc-file-name)', 2568 '<!(${ANDROID_TOOLCHAIN}/*-gcc -print-libgcc-file-name)',
2553 '-lc', 2569 '-lc',
2554 '-ldl', 2570 '-ldl',
2555 '-lstdc++', 2571 '-lstdc++',
2556 '-lm', 2572 '-lm',
2557 ], 2573 ],
2558 'conditions': [ 2574 'conditions': [
2559 ['android_upstream_bringup==1', { 2575 ['android_upstream_bringup==1', {
2560 'defines': ['ANDROID_UPSTREAM_BRINGUP=1',], 2576 'defines': ['ANDROID_UPSTREAM_BRINGUP=1',],
2561 }], 2577 }],
2578 ['asan==1', {
2579 'ldflags!': [
2580 # On Android, we link ASan runtime explicitly and
2581 # don't need -faddress-sanitizer in link flags.
2582 '-faddress-sanitizer',
2583 ],
2584 'libraries': [
2585 '<(android_lib)/libasan_preload.so',
2586 ],
2587 'cflags': [
2588 # Clang relies on -Wl,--gc-sections removing unreachable code.
2589 # ASan instrumentation for globals inhibits this and results
2590 # in a library with unresolvable relocations.
2591 # TODO(eugenis): find a way to reenable this.
2592 '-mllvm -asan-globals=0',
2593 # Asan uses a zero-based sandbox on Android. The following
2594 # option can be removed once Clang is updated past r157318
2595 '-mllvm -asan-mapping-offset-log=0',
2596 ],
2597 }],
2562 ['android_build_type==0', { 2598 ['android_build_type==0', {
2563 'defines': [ 2599 'defines': [
2564 'HAVE_OFF64_T', 2600 # The NDK has these things, but doesn't define the constants
2601 # to say that it does. Define them here instead.
2602 'HAVE_SYS_UIO_H',
2603 ],
2604 'cflags': [
2605 '--sysroot=<(android_ndk_sysroot)',
2565 ], 2606 ],
2566 'ldflags': [ 2607 'ldflags': [
2567 '--sysroot=<(android_ndk_sysroot)', 2608 '--sysroot=<(android_ndk_sysroot)',
2568 ], 2609 ],
2569 }], 2610 }],
2570 ['target_arch == "arm"', { 2611 ['target_arch == "arm"', {
2571 'ldflags': [ 2612 'ldflags': [
2572 # Enable identical code folding to reduce size. 2613 # Enable identical code folding to reduce size.
2573 '-Wl,--icf=safe', 2614 '-Wl,--icf=safe',
2574 ], 2615 ],
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
2625 '-Wl,--gc-sections', 2666 '-Wl,--gc-sections',
2626 '-Wl,-z,nocopyreloc', 2667 '-Wl,-z,nocopyreloc',
2627 # crtbegin_dynamic.o should be the last item in ldflags. 2668 # crtbegin_dynamic.o should be the last item in ldflags.
2628 '<(android_ndk_lib)/crtbegin_dynamic.o', 2669 '<(android_ndk_lib)/crtbegin_dynamic.o',
2629 ], 2670 ],
2630 'libraries': [ 2671 'libraries': [
2631 # crtend_android.o needs to be the last item in libraries. 2672 # crtend_android.o needs to be the last item in libraries.
2632 # Do not add any libraries after this! 2673 # Do not add any libraries after this!
2633 '<(android_ndk_lib)/crtend_android.o', 2674 '<(android_ndk_lib)/crtend_android.o',
2634 ], 2675 ],
2676 'conditions': [
2677 ['asan==1', {
2678 'libraries': [
2679 '<(android_static_lib)/libasan_intermediates/libasan.a',
2680 ],
2681 'cflags': [
2682 '-fPIE',
2683 ],
2684 'ldflags': [
2685 '-Wl,-u,__asan_preinit',
2686 '-pie',
2687 ],
2688 }],
2689 ],
2635 }], 2690 }],
2636 ['_type=="shared_library"', { 2691 ['_type=="shared_library" or _type=="loadable_module"', {
2637 'ldflags': [ 2692 'ldflags': [
2638 '-Wl,-shared,-Bsymbolic', 2693 '-Wl,-shared,-Bsymbolic',
2639 # crtbegin_so.o should be the last item in ldflags. 2694 # crtbegin_so.o should be the last item in ldflags.
2640 '<(android_ndk_lib)/crtbegin_so.o', 2695 '<(android_ndk_lib)/crtbegin_so.o',
2641 ], 2696 ],
2642 'libraries': [ 2697 'libraries': [
2643 # crtend_so.o needs to be the last item in libraries. 2698 # crtend_so.o needs to be the last item in libraries.
2644 # Do not add any libraries after this! 2699 # Do not add any libraries after this!
2645 '<(android_ndk_lib)/crtend_so.o', 2700 '<(android_ndk_lib)/crtend_so.o',
2646 ], 2701 ],
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
3261 ['CXX', '<(make_clang_dir)/bin/clang++'], 3316 ['CXX', '<(make_clang_dir)/bin/clang++'],
3262 ['LINK', '$(CXX)'], 3317 ['LINK', '$(CXX)'],
3263 ['CC.host', '$(CC)'], 3318 ['CC.host', '$(CC)'],
3264 ['CXX.host', '$(CXX)'], 3319 ['CXX.host', '$(CXX)'],
3265 ['LINK.host', '$(LINK)'], 3320 ['LINK.host', '$(LINK)'],
3266 ], 3321 ],
3267 }], 3322 }],
3268 ['OS=="android" and "<(GENERATOR)"!="ninja"', { 3323 ['OS=="android" and "<(GENERATOR)"!="ninja"', {
3269 # Hardcode the compiler names in the Makefile so that 3324 # Hardcode the compiler names in the Makefile so that
3270 # it won't depend on the environment at make time. 3325 # it won't depend on the environment at make time.
3271 'make_global_settings': [ 3326 'conditions': [
3272 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-g cc)'], 3327 ['clang==1', {
3273 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*- g++)'], 3328 'make_global_settings': [
3274 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/* -gcc)'], 3329 ['CC', '<!(/bin/echo -n $CROSS_CC)'],
3275 ['CC.host', '<!(which gcc)'], 3330 ['CXX', '<!(/bin/echo -n $CROSS_CXX)'],
3276 ['CXX.host', '<!(which g++)'], 3331 ['LINK', '<!(/bin/echo -n $CROSS_LINK)'],
3277 ['LINK.host', '<!(which g++)'], 3332 ['CC.host', '<!(/bin/echo -n $HOST_CC)'],
3333 ['CXX.host', '<!(/bin/echo -n $HOST_CXX)'],
3334 ['LINK.host', '<!(/bin/echo -n $HOST_LINK)'],
3335 ],
3336 }, {
3337 'make_global_settings': [
3338 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN} /*-gcc)'],
3339 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN }/*-g++)'],
3340 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAI N}/*-gcc)'],
3341 ['CC.host', '<!(which gcc)'],
3342 ['CXX.host', '<!(which g++)'],
3343 ['LINK.host', '<!(which g++)'],
3344 ],
3345 },
3346 ],
3278 ], 3347 ],
3279 }], 3348 }],
3280 ], 3349 ],
3281 'xcode_settings': { 3350 'xcode_settings': {
3282 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! 3351 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
3283 # This block adds *project-wide* configuration settings to each project 3352 # This block adds *project-wide* configuration settings to each project
3284 # file. It's almost always wrong to put things here. Specify your 3353 # file. It's almost always wrong to put things here. Specify your
3285 # custom xcode_settings in target_defaults to add them to targets instead. 3354 # custom xcode_settings in target_defaults to add them to targets instead.
3286 3355
3287 'conditions': [ 3356 'conditions': [
(...skipping 21 matching lines...) Expand all
3309 # settings in target dicts. SYMROOT is a special case, because many other 3378 # settings in target dicts. SYMROOT is a special case, because many other
3310 # Xcode variables depend on it, including variables such as 3379 # Xcode variables depend on it, including variables such as
3311 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 3380 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
3312 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 3381 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
3313 # files to appear (when present) in the UI as actual files and not red 3382 # files to appear (when present) in the UI as actual files and not red
3314 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 3383 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
3315 # and therefore SYMROOT, needs to be set at the project level. 3384 # and therefore SYMROOT, needs to be set at the project level.
3316 'SYMROOT': '<(DEPTH)/xcodebuild', 3385 'SYMROOT': '<(DEPTH)/xcodebuild',
3317 }, 3386 },
3318 } 3387 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698