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 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1420 # The version of GCC in use, set later in platforms that use GCC and have | 1420 # The version of GCC in use, set later in platforms that use GCC and have |
1421 # not explicitly chosen to build with clang. Currently, this means all | 1421 # not explicitly chosen to build with clang. Currently, this means all |
1422 # platforms except Windows, Mac and iOS. | 1422 # platforms except Windows, Mac and iOS. |
1423 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that | 1423 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that |
1424 # it takes effect here. | 1424 # it takes effect here. |
1425 ['os_posix==1 and OS!="mac" and OS!="ios" and clang==0 and asan==0 and lsa
n==0 and tsan==0 and msan==0', { | 1425 ['os_posix==1 and OS!="mac" and OS!="ios" and clang==0 and asan==0 and lsa
n==0 and tsan==0 and msan==0', { |
1426 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler)', | 1426 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler)', |
1427 'conditions': [ | 1427 'conditions': [ |
1428 ['OS=="android"', { | 1428 ['OS=="android"', { |
1429 # We directly set the gcc versions since we know what we use. | 1429 # We directly set the gcc versions since we know what we use. |
1430 'conditions': [ | 1430 'gcc_version%': 48, |
1431 ['target_arch=="x64" or target_arch=="arm64"', { | |
1432 'gcc_version%': 48, | |
1433 }, { | |
1434 'gcc_version%': 46, | |
1435 }], | |
1436 ], | |
1437 }, { | 1431 }, { |
1438 'gcc_version%': '<!pymod_do_main(compiler_version target compiler)', | 1432 'gcc_version%': '<!pymod_do_main(compiler_version target compiler)', |
1439 }], | 1433 }], |
1440 ], | 1434 ], |
1441 }, { | 1435 }, { |
1442 'host_gcc_version%': 0, | 1436 'host_gcc_version%': 0, |
1443 'gcc_version%': 0, | 1437 'gcc_version%': 0, |
1444 }], | 1438 }], |
1445 ['OS=="win" and "<!pymod_do_main(dir_exists <(windows_sdk_default_path))"=
="True"', { | 1439 ['OS=="win" and "<!pymod_do_main(dir_exists <(windows_sdk_default_path))"=
="True"', { |
1446 'windows_sdk_path%': '<(windows_sdk_default_path)', | 1440 'windows_sdk_path%': '<(windows_sdk_default_path)', |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1560 | 1554 |
1561 # Android API level 14 is ICS (Android 4.0) which is the minimum | 1555 # Android API level 14 is ICS (Android 4.0) which is the minimum |
1562 # platform requirement for Chrome on Android, we use it for native | 1556 # platform requirement for Chrome on Android, we use it for native |
1563 # code compilation. | 1557 # code compilation. |
1564 'conditions': [ | 1558 'conditions': [ |
1565 ['target_arch == "ia32"', { | 1559 ['target_arch == "ia32"', { |
1566 'android_app_abi%': 'x86', | 1560 'android_app_abi%': 'x86', |
1567 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gd
bserver/gdbserver', | 1561 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gd
bserver/gdbserver', |
1568 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/
arch-x86', | 1562 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/
arch-x86', |
1569 'android_ndk_lib_dir%': 'usr/lib', | 1563 'android_ndk_lib_dir%': 'usr/lib', |
1570 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/preb
uilt/<(host_os)-<(android_host_arch)/bin', | 1564 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.8/preb
uilt/<(host_os)-<(android_host_arch)/bin', |
1571 }], | 1565 }], |
1572 ['target_arch == "x64"', { | 1566 ['target_arch == "x64"', { |
1573 'android_app_abi%': 'x86_64', | 1567 'android_app_abi%': 'x86_64', |
1574 'android_gdbserver%': '<(android_ndk_experimental_root)/prebuilt/a
ndroid-x86_64/gdbserver/gdbserver', | 1568 'android_gdbserver%': '<(android_ndk_experimental_root)/prebuilt/a
ndroid-x86_64/gdbserver/gdbserver', |
1575 'android_ndk_sysroot%': '<(android_ndk_experimental_root)/platform
s/android-20/arch-x86_64', | 1569 'android_ndk_sysroot%': '<(android_ndk_experimental_root)/platform
s/android-20/arch-x86_64', |
1576 'android_ndk_lib_dir%': 'usr/lib64', | 1570 'android_ndk_lib_dir%': 'usr/lib64', |
1577 'android_toolchain%': '<(android_ndk_experimental_root)/toolchains
/x86_64-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', | 1571 'android_toolchain%': '<(android_ndk_experimental_root)/toolchains
/x86_64-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', |
1578 'android_stlport_root': '<(android_ndk_experimental_root)/sources/
cxx-stl/stlport', | 1572 'android_stlport_root': '<(android_ndk_experimental_root)/sources/
cxx-stl/stlport', |
1579 }], | 1573 }], |
1580 ['target_arch=="arm"', { | 1574 ['target_arch=="arm"', { |
1581 'conditions': [ | 1575 'conditions': [ |
1582 ['arm_version<7', { | 1576 ['arm_version<7', { |
1583 'android_app_abi%': 'armeabi', | 1577 'android_app_abi%': 'armeabi', |
1584 }, { | 1578 }, { |
1585 'android_app_abi%': 'armeabi-v7a', | 1579 'android_app_abi%': 'armeabi-v7a', |
1586 }], | 1580 }], |
1587 ], | 1581 ], |
1588 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gd
bserver/gdbserver', | 1582 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gd
bserver/gdbserver', |
1589 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/
arch-arm', | 1583 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/
arch-arm', |
1590 'android_ndk_lib_dir%': 'usr/lib', | 1584 'android_ndk_lib_dir%': 'usr/lib', |
1591 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-an
droideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin', | 1585 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-an
droideabi-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', |
1592 }], | 1586 }], |
1593 ['target_arch == "arm64"', { | 1587 ['target_arch == "arm64"', { |
1594 'android_app_abi%': 'arm64-v8a', | 1588 'android_app_abi%': 'arm64-v8a', |
1595 'android_gdbserver%': '<(android_ndk_experimental_root)/prebuilt/a
ndroid-arm64/gdbserver/gdbserver', | 1589 'android_gdbserver%': '<(android_ndk_experimental_root)/prebuilt/a
ndroid-arm64/gdbserver/gdbserver', |
1596 'android_ndk_sysroot%': '<(android_ndk_experimental_root)/platform
s/android-20/arch-arm64', | 1590 'android_ndk_sysroot%': '<(android_ndk_experimental_root)/platform
s/android-20/arch-arm64', |
1597 'android_ndk_lib_dir%': 'usr/lib', | 1591 'android_ndk_lib_dir%': 'usr/lib', |
1598 'android_toolchain%': '<(android_ndk_experimental_root)/toolchains
/aarch64-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', | 1592 'android_toolchain%': '<(android_ndk_experimental_root)/toolchains
/aarch64-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', |
1599 'android_stlport_root': '<(android_ndk_experimental_root)/sources/
cxx-stl/stlport', | 1593 'android_stlport_root': '<(android_ndk_experimental_root)/sources/
cxx-stl/stlport', |
1600 }], | 1594 }], |
1601 ['target_arch == "mipsel"', { | 1595 ['target_arch == "mipsel"', { |
1602 'android_app_abi%': 'mips', | 1596 'android_app_abi%': 'mips', |
1603 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/g
dbserver/gdbserver', | 1597 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/g
dbserver/gdbserver', |
1604 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/
arch-mips', | 1598 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/
arch-mips', |
1605 'android_ndk_lib_dir%': 'usr/lib', | 1599 'android_ndk_lib_dir%': 'usr/lib', |
1606 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux
-android-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin', | 1600 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux
-android-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', |
1607 }], | 1601 }], |
1608 ], | 1602 ], |
1609 }, | 1603 }, |
1610 # Copy conditionally-set variables out one scope. | 1604 # Copy conditionally-set variables out one scope. |
1611 'android_app_abi%': '<(android_app_abi)', | 1605 'android_app_abi%': '<(android_app_abi)', |
1612 'android_gdbserver%': '<(android_gdbserver)', | 1606 'android_gdbserver%': '<(android_gdbserver)', |
1613 'android_ndk_root%': '<(android_ndk_root)', | 1607 'android_ndk_root%': '<(android_ndk_root)', |
1614 'android_ndk_sysroot%': '<(android_ndk_sysroot)', | 1608 'android_ndk_sysroot%': '<(android_ndk_sysroot)', |
1615 'android_sdk_root%': '<(android_sdk_root)', | 1609 'android_sdk_root%': '<(android_sdk_root)', |
1616 'android_sdk_version%': '<(android_sdk_version)', | 1610 'android_sdk_version%': '<(android_sdk_version)', |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2075 # Set default compiler flags depending on ARM version. | 2069 # Set default compiler flags depending on ARM version. |
2076 ['arm_version==6 and android_webview_build==0', { | 2070 ['arm_version==6 and android_webview_build==0', { |
2077 'arm_arch%': 'armv6', | 2071 'arm_arch%': 'armv6', |
2078 'arm_tune%': '', | 2072 'arm_tune%': '', |
2079 'arm_fpu%': 'vfp', | 2073 'arm_fpu%': 'vfp', |
2080 'arm_float_abi%': 'softfp', | 2074 'arm_float_abi%': 'softfp', |
2081 'arm_thumb%': 0, | 2075 'arm_thumb%': 0, |
2082 }], | 2076 }], |
2083 ['arm_version==7 and android_webview_build==0', { | 2077 ['arm_version==7 and android_webview_build==0', { |
2084 'arm_arch%': 'armv7-a', | 2078 'arm_arch%': 'armv7-a', |
2085 'arm_tune%': '', | 2079 'arm_tune%': 'generic-armv7-a', |
2086 'conditions': [ | 2080 'conditions': [ |
2087 ['arm_neon==1', { | 2081 ['arm_neon==1', { |
2088 'arm_fpu%': 'neon', | 2082 'arm_fpu%': 'neon', |
2089 }, { | 2083 }, { |
2090 'arm_fpu%': 'vfpv3-d16', | 2084 'arm_fpu%': 'vfpv3-d16', |
2091 }], | 2085 }], |
2092 ], | 2086 ], |
2093 # Change the default to hard once the armhf transition is complete. | 2087 # Change the default to hard once the armhf transition is complete. |
2094 'arm_float_abi%': 'softfp', | 2088 'arm_float_abi%': 'softfp', |
2095 'arm_thumb%': 1, | 2089 'arm_thumb%': 1, |
(...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3477 }], | 3471 }], |
3478 ['arm_thumb==1', { | 3472 ['arm_thumb==1', { |
3479 'cflags': [ | 3473 'cflags': [ |
3480 '-mthumb', | 3474 '-mthumb', |
3481 ] | 3475 ] |
3482 }], | 3476 }], |
3483 ['OS=="android"', { | 3477 ['OS=="android"', { |
3484 # Most of the following flags are derived from what Android | 3478 # Most of the following flags are derived from what Android |
3485 # uses by default when building for arm, reference for which | 3479 # uses by default when building for arm, reference for which |
3486 # can be found in the following file in the Android NDK: | 3480 # can be found in the following file in the Android NDK: |
3487 # toolchains/arm-linux-androideabi-4.4.3/setup.mk | 3481 # toolchains/arm-linux-androideabi-4.8/setup.mk |
3488 'cflags': [ | 3482 'cflags': [ |
3489 # The tree-sra optimization (scalar replacement for | 3483 # The tree-sra optimization (scalar replacement for |
3490 # aggregates enabling subsequent optimizations) leads to | 3484 # aggregates enabling subsequent optimizations) leads to |
3491 # invalid code generation when using the Android NDK's | 3485 # invalid code generation when using the Android NDK's |
3492 # compiler (r5-r7). This can be verified using | 3486 # compiler (r5-r7). This can be verified using |
3493 # webkit_unit_tests' WTF.Checked_int8_t test. | 3487 # webkit_unit_tests' WTF.Checked_int8_t test. |
3494 '-fno-tree-sra', | 3488 '-fno-tree-sra', |
| 3489 # The following 6 options are disabled to save on |
| 3490 # binary size in gcc 4.8. |
| 3491 # TODO(fdegans) Reevaluate when we upgrade GCC. |
| 3492 '-fno-partial-inlining', |
| 3493 '-fno-early-inlining', |
| 3494 '-fno-tree-copy-prop', |
| 3495 '-fno-tree-loop-optimize', |
| 3496 '-fno-move-loop-invariants', |
| 3497 '-fno-caller-saves', |
3495 '-Wno-psabi', | 3498 '-Wno-psabi', |
3496 ], | 3499 ], |
3497 # Android now supports .relro sections properly. | 3500 # Android now supports .relro sections properly. |
3498 # NOTE: While these flags enable the generation of .relro | 3501 # NOTE: While these flags enable the generation of .relro |
3499 # sections, the generated libraries can still be loaded on | 3502 # sections, the generated libraries can still be loaded on |
3500 # older Android platform versions. | 3503 # older Android platform versions. |
3501 'ldflags': [ | 3504 'ldflags': [ |
3502 '-Wl,-z,relro', | 3505 '-Wl,-z,relro', |
3503 '-Wl,-z,now', | 3506 '-Wl,-z,now', |
3504 '-fuse-ld=gold', | 3507 '-fuse-ld=gold', |
3505 ], | 3508 ], |
3506 'conditions': [ | 3509 'conditions': [ |
3507 ['arm_thumb==1', { | 3510 ['arm_thumb==1', { |
3508 'cflags': [ '-mthumb-interwork' ], | 3511 'cflags': [ '-mthumb-interwork' ], |
3509 }], | 3512 }], |
3510 ['profiling==1', { | 3513 ['profiling==1', { |
3511 'cflags': [ | 3514 'cflags': [ |
3512 '-marm', # Probably reduntant, but recommend by "perf"
docs. | 3515 '-marm', # Probably reduntant, but recommend by "perf"
docs. |
3513 '-mapcs-frame', # Seems required by -fno-omit-frame-po
inter. | 3516 '-mapcs-frame', # Seems required by -fno-omit-frame-po
inter. |
3514 ], | 3517 ], |
3515 }], | 3518 }], |
3516 ['clang==1', { | 3519 ['clang==1', { |
3517 'cflags!': [ | 3520 'cflags!': [ |
3518 # Clang does not support the following options. | 3521 # Clang does not support the following options. |
3519 '-mthumb-interwork', | 3522 '-mthumb-interwork', |
3520 '-finline-limit=64', | 3523 '-finline-limit=64', |
3521 '-fno-tree-sra', | 3524 '-fno-tree-sra', |
| 3525 '-fno-partial-inlining', |
| 3526 '-fno-early-inlining', |
| 3527 '-fno-tree-copy-prop', |
| 3528 '-fno-tree-loop-optimize', |
| 3529 '-fno-move-loop-invariants', |
| 3530 '-fno-caller-saves', |
3522 '-Wno-psabi', | 3531 '-Wno-psabi', |
3523 ], | 3532 ], |
3524 'cflags': [ | 3533 'cflags': [ |
3525 # TODO(hans) Enable integrated-as (crbug.com/124610). | 3534 # TODO(hans) Enable integrated-as (crbug.com/124610). |
3526 '-no-integrated-as', | 3535 '-no-integrated-as', |
3527 '-B<(android_toolchain)', # Else /usr/bin/as gets pic
ked up. | 3536 '-B<(android_toolchain)', # Else /usr/bin/as gets pic
ked up. |
3528 ], | 3537 ], |
3529 | 3538 |
3530 'ldflags!': [ | 3539 'ldflags!': [ |
3531 # Clang does not support the following options. | 3540 # Clang does not support the following options. |
(...skipping 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5279 # settings in target dicts. SYMROOT is a special case, because many other | 5288 # settings in target dicts. SYMROOT is a special case, because many other |
5280 # Xcode variables depend on it, including variables such as | 5289 # Xcode variables depend on it, including variables such as |
5281 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 5290 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
5282 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 5291 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
5283 # files to appear (when present) in the UI as actual files and not red | 5292 # files to appear (when present) in the UI as actual files and not red |
5284 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 5293 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
5285 # and therefore SYMROOT, needs to be set at the project level. | 5294 # and therefore SYMROOT, needs to be set at the project level. |
5286 'SYMROOT': '<(DEPTH)/xcodebuild', | 5295 'SYMROOT': '<(DEPTH)/xcodebuild', |
5287 }, | 5296 }, |
5288 } | 5297 } |
OLD | NEW |