OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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, |
973 }, { | 971 }, { |
974 'linux_breakpad%': 0, | 972 'linux_breakpad%': 0, |
975 }], | 973 }], |
976 ], | 974 ], |
977 | 975 |
978 # TODO(steveblock): Investigate using the system versions of sqlite and | 976 # TODO(steveblock): Investigate using the system versions of sqlite and |
979 # libjpeg. | 977 # libjpeg. |
980 # Enable to use system sqlite. | 978 # Enable to use system sqlite. |
981 'use_system_sqlite%': 0, # '<(android_build_type)', | 979 'use_system_sqlite%': 0, # '<(android_build_type)', |
(...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2183 'conditions': [ | 2181 'conditions': [ |
2184 ['arm_thumb==1', { | 2182 ['arm_thumb==1', { |
2185 'cflags': [ | 2183 'cflags': [ |
2186 '-mthumb', | 2184 '-mthumb', |
2187 ] | 2185 ] |
2188 }], | 2186 }], |
2189 ['armv7==1', { | 2187 ['armv7==1', { |
2190 'cflags': [ | 2188 'cflags': [ |
2191 '-march=armv7-a', | 2189 '-march=armv7-a', |
2192 '-mtune=cortex-a8', | 2190 '-mtune=cortex-a8', |
2193 '-mfloat-abi=<(arm_float_abi)', | |
Ami GONE FROM CHROMIUM
2012/07/24 18:06:28
Why did you remove this?
Yaron
2012/07/24 18:16:45
I was merging in changes from downstream. The cond
| |
2194 ], | 2191 ], |
2195 'conditions': [ | 2192 'conditions': [ |
2196 ['arm_neon==1', { | 2193 ['arm_neon==1', { |
2197 'cflags': [ '-mfpu=neon', ], | 2194 'cflags': [ '-mfpu=neon', ], |
2198 }, { | 2195 }, { |
2199 'cflags': [ '-mfpu=<(arm_fpu)', ], | 2196 'cflags': [ '-mfpu=<(arm_fpu)', ], |
2197 }], | |
2198 ['clang==1', { | |
2199 'cflags': [ '-mfloat-abi=soft', ], | |
Ami GONE FROM CHROMIUM
2012/07/24 18:06:28
This is broken for cros/arm builds (which don't us
| |
2200 'cflags!': [ | |
2201 # -mfpu handling in Clang is broken. | |
2202 '-mfpu=neon', | |
2203 '-mfpu=<(arm_fpu)', | |
2204 # Clang does not support the following options. | |
2205 '-mthumb-interwork', | |
2206 '-finline-limit=64', | |
2207 '-fno-tree-sra', | |
2208 '-Wno-psabi', | |
2209 ], | |
2210 }, { | |
2211 'cflags': [ '-mfloat-abi=softfp', ], | |
Ami GONE FROM CHROMIUM
2012/07/24 18:06:28
This is just busted. It hardcodes softfp for all
| |
2200 }] | 2212 }] |
2201 ], | 2213 ], |
2202 }], | 2214 }], |
2203 ['OS=="android"', { | 2215 ['OS=="android"', { |
2204 # Most of the following flags are derived from what Android | 2216 # Most of the following flags are derived from what Android |
2205 # uses by default when building for arm, reference for which | 2217 # uses by default when building for arm, reference for which |
2206 # can be found in the following file in the Android NDK: | 2218 # can be found in the following file in the Android NDK: |
2207 # toolchains/arm-linux-androideabi-4.4.3/setup.mk | 2219 # toolchains/arm-linux-androideabi-4.4.3/setup.mk |
2208 'cflags': [ | 2220 'cflags': [ |
2209 # The tree-sra optimization (scalar replacement for | 2221 # The tree-sra optimization (scalar replacement for |
2210 # aggregates enabling subsequent optimizations) leads to | 2222 # aggregates enabling subsequent optimizations) leads to |
2211 # invalid code generation when using the Android NDK's | 2223 # invalid code generation when using the Android NDK's |
2212 # compiler (r5-r7). This can be verified using | 2224 # compiler (r5-r7). This can be verified using |
2213 # TestWebKitAPI's WTF.Checked_int8_t test. | 2225 # TestWebKitAPI's WTF.Checked_int8_t test. |
2214 '-fno-tree-sra', | 2226 '-fno-tree-sra', |
2215 '-Wno-psabi', | 2227 '-Wno-psabi', |
2216 ], | 2228 ], |
2229 'cflags_cc': [ | |
2230 # TODO(beverloo): WebKit warns about using the "nullptr" | |
2231 # identifier in NullPtr.h, which actually is valid usage. | |
2232 # We should remove this flag once we know why the warning | |
2233 # suddenly shows up on JellyBean. (crbug/138166) | |
2234 '-Wno-c++0x-compat', | |
2235 ], | |
2217 # Android now supports .relro sections properly. | 2236 # Android now supports .relro sections properly. |
2218 # NOTE: While these flags enable the generation of .relro | 2237 # NOTE: While these flags enable the generation of .relro |
2219 # sections, the generated libraries can still be loaded on | 2238 # sections, the generated libraries can still be loaded on |
2220 # older Android platform versions. | 2239 # older Android platform versions. |
2221 'ldflags': [ | 2240 'ldflags': [ |
2222 '-Wl,-z,relro', | 2241 '-Wl,-z,relro', |
2223 '-Wl,-z,now', | 2242 '-Wl,-z,now', |
2224 ], | 2243 ], |
2225 'conditions': [ | 2244 'conditions': [ |
2226 ['arm_thumb == 1', { | 2245 ['arm_thumb == 1', { |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2508 # libgcc.a to the start of libraries which puts it in the | 2527 # libgcc.a to the start of libraries which puts it in the |
2509 # proper spot after .o and .a files get linked in. | 2528 # proper spot after .o and .a files get linked in. |
2510 # | 2529 # |
2511 # TODO: The proper thing to do longer-tem would be proper gyp | 2530 # TODO: The proper thing to do longer-tem would be proper gyp |
2512 # support for a custom link command line. | 2531 # support for a custom link command line. |
2513 ['_toolset=="target"', { | 2532 ['_toolset=="target"', { |
2514 'cflags!': [ | 2533 'cflags!': [ |
2515 '-pthread', # Not supported by Android toolchain. | 2534 '-pthread', # Not supported by Android toolchain. |
2516 ], | 2535 ], |
2517 'cflags': [ | 2536 'cflags': [ |
2518 '-U__linux__', # Don't allow toolchain to claim -D__linux__ | |
2519 '-ffunction-sections', | 2537 '-ffunction-sections', |
2520 '-funwind-tables', | 2538 '-funwind-tables', |
2521 '-g', | 2539 '-g', |
2522 '-fstack-protector', | 2540 '-fstack-protector', |
2523 '-fno-short-enums', | 2541 '-fno-short-enums', |
2524 '-finline-limit=64', | 2542 '-finline-limit=64', |
2525 '-Wa,--noexecstack', | 2543 '-Wa,--noexecstack', |
2526 '-Wno-error=non-virtual-dtor', # TODO(michaelbai): Fix warnings. | |
2527 '<@(release_extra_cflags)', | 2544 '<@(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 ], | 2545 ], |
2532 'defines': [ | 2546 'defines': [ |
2533 'ANDROID', | 2547 'ANDROID', |
2534 '__GNU_SOURCE=1', # Necessary for clone() | 2548 '__GNU_SOURCE=1', # Necessary for clone() |
2535 'USE_STLPORT=1', | 2549 'USE_STLPORT=1', |
2536 '_STLP_USE_PTR_SPECIALIZATIONS=1', | 2550 '_STLP_USE_PTR_SPECIALIZATIONS=1', |
2537 'HAVE_SYS_UIO_H', | |
2538 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize . | |
2539 ], | 2551 ], |
2540 'ldflags!': [ | 2552 'ldflags!': [ |
2541 '-pthread', # Not supported by Android toolchain. | 2553 '-pthread', # Not supported by Android toolchain. |
2542 ], | 2554 ], |
2543 'ldflags': [ | 2555 'ldflags': [ |
2544 '-nostdlib', | 2556 '-nostdlib', |
2545 '-Wl,--no-undefined', | 2557 '-Wl,--no-undefined', |
2546 # Don't export symbols from statically linked libraries. | 2558 # Don't export symbols from statically linked libraries. |
2547 '-Wl,--exclude-libs=ALL', | 2559 '-Wl,--exclude-libs=ALL', |
2548 ], | 2560 ], |
2549 'libraries': [ | 2561 'libraries': [ |
2550 '-l<(android_stlport_library)', | 2562 '-l<(android_stlport_library)', |
2551 # Manually link the libgcc.a that the cross compiler uses. | 2563 # Manually link the libgcc.a that the cross compiler uses. |
2552 '<!(${ANDROID_TOOLCHAIN}/*-gcc -print-libgcc-file-name)', | 2564 '<!(${ANDROID_TOOLCHAIN}/*-gcc -print-libgcc-file-name)', |
2553 '-lc', | 2565 '-lc', |
2554 '-ldl', | 2566 '-ldl', |
2555 '-lstdc++', | 2567 '-lstdc++', |
2556 '-lm', | 2568 '-lm', |
2557 ], | 2569 ], |
2558 'conditions': [ | 2570 'conditions': [ |
2559 ['android_upstream_bringup==1', { | 2571 ['android_upstream_bringup==1', { |
2560 'defines': ['ANDROID_UPSTREAM_BRINGUP=1',], | 2572 'defines': ['ANDROID_UPSTREAM_BRINGUP=1',], |
2561 }], | 2573 }], |
2574 ['asan==1', { | |
2575 'ldflags!': [ | |
2576 # On Android, we link ASan runtime explicitly and | |
2577 # don't need -faddress-sanitizer in link flags. | |
2578 '-faddress-sanitizer', | |
2579 ], | |
2580 'libraries': [ | |
2581 '<(android_lib)/libasan_preload.so', | |
2582 ], | |
2583 'cflags': [ | |
2584 # Clang relies on -Wl,--gc-sections removing unreachable code. | |
2585 # ASan instrumentation for globals inhibits this and results | |
2586 # in a library with unresolvable relocations. | |
2587 # TODO(eugenis): find a way to reenable this. | |
2588 '-mllvm -asan-globals=0', | |
2589 # Asan uses a zero-based sandbox on Android. The following | |
2590 # option can be removed once Clang is updated past r157318 | |
2591 '-mllvm -asan-mapping-offset-log=0', | |
2592 ], | |
2593 }], | |
2562 ['android_build_type==0', { | 2594 ['android_build_type==0', { |
2563 'defines': [ | 2595 'defines': [ |
2564 'HAVE_OFF64_T', | 2596 # The NDK has these things, but doesn't define the constants |
2597 # to say that it does. Define them here instead. | |
2598 'HAVE_SYS_UIO_H', | |
2599 ], | |
2600 'cflags': [ | |
2601 '--sysroot=<(android_ndk_sysroot)', | |
2565 ], | 2602 ], |
2566 'ldflags': [ | 2603 'ldflags': [ |
2567 '--sysroot=<(android_ndk_sysroot)', | 2604 '--sysroot=<(android_ndk_sysroot)', |
2568 ], | 2605 ], |
2569 }], | 2606 }], |
2570 ['target_arch == "arm"', { | 2607 ['target_arch == "arm"', { |
2571 'ldflags': [ | 2608 'ldflags': [ |
2572 # Enable identical code folding to reduce size. | 2609 # Enable identical code folding to reduce size. |
2573 '-Wl,--icf=safe', | 2610 '-Wl,--icf=safe', |
2574 ], | 2611 ], |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2625 '-Wl,--gc-sections', | 2662 '-Wl,--gc-sections', |
2626 '-Wl,-z,nocopyreloc', | 2663 '-Wl,-z,nocopyreloc', |
2627 # crtbegin_dynamic.o should be the last item in ldflags. | 2664 # crtbegin_dynamic.o should be the last item in ldflags. |
2628 '<(android_ndk_lib)/crtbegin_dynamic.o', | 2665 '<(android_ndk_lib)/crtbegin_dynamic.o', |
2629 ], | 2666 ], |
2630 'libraries': [ | 2667 'libraries': [ |
2631 # crtend_android.o needs to be the last item in libraries. | 2668 # crtend_android.o needs to be the last item in libraries. |
2632 # Do not add any libraries after this! | 2669 # Do not add any libraries after this! |
2633 '<(android_ndk_lib)/crtend_android.o', | 2670 '<(android_ndk_lib)/crtend_android.o', |
2634 ], | 2671 ], |
2672 'conditions': [ | |
2673 ['asan==1', { | |
2674 'libraries': [ | |
2675 '<(android_static_lib)/libasan_intermediates/libasan.a', | |
2676 ], | |
2677 'cflags': [ | |
2678 '-fPIE', | |
2679 ], | |
2680 'ldflags': [ | |
2681 '-Wl,-u,__asan_preinit', | |
2682 '-pie', | |
2683 ], | |
2684 }], | |
2685 ], | |
2635 }], | 2686 }], |
2636 ['_type=="shared_library"', { | 2687 ['_type=="shared_library" or _type=="loadable_module"', { |
2637 'ldflags': [ | 2688 'ldflags': [ |
2638 '-Wl,-shared,-Bsymbolic', | 2689 '-Wl,-shared,-Bsymbolic', |
2639 # crtbegin_so.o should be the last item in ldflags. | 2690 # crtbegin_so.o should be the last item in ldflags. |
2640 '<(android_ndk_lib)/crtbegin_so.o', | 2691 '<(android_ndk_lib)/crtbegin_so.o', |
2641 ], | 2692 ], |
2642 'libraries': [ | 2693 'libraries': [ |
2643 # crtend_so.o needs to be the last item in libraries. | 2694 # crtend_so.o needs to be the last item in libraries. |
2644 # Do not add any libraries after this! | 2695 # Do not add any libraries after this! |
2645 '<(android_ndk_lib)/crtend_so.o', | 2696 '<(android_ndk_lib)/crtend_so.o', |
2646 ], | 2697 ], |
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3261 ['CXX', '<(make_clang_dir)/bin/clang++'], | 3312 ['CXX', '<(make_clang_dir)/bin/clang++'], |
3262 ['LINK', '$(CXX)'], | 3313 ['LINK', '$(CXX)'], |
3263 ['CC.host', '$(CC)'], | 3314 ['CC.host', '$(CC)'], |
3264 ['CXX.host', '$(CXX)'], | 3315 ['CXX.host', '$(CXX)'], |
3265 ['LINK.host', '$(LINK)'], | 3316 ['LINK.host', '$(LINK)'], |
3266 ], | 3317 ], |
3267 }], | 3318 }], |
3268 ['OS=="android" and "<(GENERATOR)"!="ninja"', { | 3319 ['OS=="android" and "<(GENERATOR)"!="ninja"', { |
3269 # Hardcode the compiler names in the Makefile so that | 3320 # Hardcode the compiler names in the Makefile so that |
3270 # it won't depend on the environment at make time. | 3321 # it won't depend on the environment at make time. |
3271 'make_global_settings': [ | 3322 'conditions': [ |
3272 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-g cc)'], | 3323 ['clang==1', { |
3273 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*- g++)'], | 3324 'make_global_settings': [ |
3274 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/* -gcc)'], | 3325 ['CC', '<!(/bin/echo -n $CROSS_CC)'], |
3275 ['CC.host', '<!(which gcc)'], | 3326 ['CXX', '<!(/bin/echo -n $CROSS_CXX)'], |
3276 ['CXX.host', '<!(which g++)'], | 3327 ['LINK', '<!(/bin/echo -n $CROSS_LINK)'], |
3277 ['LINK.host', '<!(which g++)'], | 3328 ['CC.host', '<!(/bin/echo -n $HOST_CC)'], |
3329 ['CXX.host', '<!(/bin/echo -n $HOST_CXX)'], | |
3330 ['LINK.host', '<!(/bin/echo -n $HOST_LINK)'], | |
3331 ], | |
3332 }, { | |
3333 'make_global_settings': [ | |
3334 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN} /*-gcc)'], | |
3335 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN }/*-g++)'], | |
3336 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAI N}/*-gcc)'], | |
3337 ['CC.host', '<!(which gcc)'], | |
3338 ['CXX.host', '<!(which g++)'], | |
3339 ['LINK.host', '<!(which g++)'], | |
3340 ], | |
3341 }, | |
3342 ], | |
3278 ], | 3343 ], |
3279 }], | 3344 }], |
3280 ], | 3345 ], |
3281 'xcode_settings': { | 3346 'xcode_settings': { |
3282 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! | 3347 # 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 | 3348 # This block adds *project-wide* configuration settings to each project |
3284 # file. It's almost always wrong to put things here. Specify your | 3349 # 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. | 3350 # custom xcode_settings in target_defaults to add them to targets instead. |
3286 | 3351 |
3287 'conditions': [ | 3352 'conditions': [ |
(...skipping 21 matching lines...) Expand all Loading... | |
3309 # settings in target dicts. SYMROOT is a special case, because many other | 3374 # settings in target dicts. SYMROOT is a special case, because many other |
3310 # Xcode variables depend on it, including variables such as | 3375 # Xcode variables depend on it, including variables such as |
3311 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 3376 # 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 | 3377 # 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 | 3378 # 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, | 3379 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
3315 # and therefore SYMROOT, needs to be set at the project level. | 3380 # and therefore SYMROOT, needs to be set at the project level. |
3316 'SYMROOT': '<(DEPTH)/xcodebuild', | 3381 'SYMROOT': '<(DEPTH)/xcodebuild', |
3317 }, | 3382 }, |
3318 } | 3383 } |
OLD | NEW |