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

Side by Side Diff: build/common.gypi

Issue 482173003: Revert of linux: Always use (64bit) gold for linking, even on 32bit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | build/config/compiler/BUILD.gn » ('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 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 # Whether PPAPI is enabled. 802 # Whether PPAPI is enabled.
803 ['OS=="android" or OS=="ios" or embedded==1', { 803 ['OS=="android" or OS=="ios" or embedded==1', {
804 'enable_plugins%': 0, 804 'enable_plugins%': 0,
805 }, { 805 }, {
806 'enable_plugins%': 1, 806 'enable_plugins%': 1,
807 }], 807 }],
808 808
809 # linux_use_bundled_gold: whether to use the gold linker binary checked 809 # linux_use_bundled_gold: whether to use the gold linker binary checked
810 # into third_party/binutils. Force this off via GYP_DEFINES when you 810 # into third_party/binutils. Force this off via GYP_DEFINES when you
811 # are using a custom toolchain and need to control -B in ldflags. 811 # are using a custom toolchain and need to control -B in ldflags.
812 # 32-bit hosts have to be 32-bit userland with a 64-bit kernel, so that 812 # Do not use 32-bit gold on 32-bit hosts as it runs out address space
813 # 64-bit gold gets used. 32-bit gold will run out of address space. 813 # for component=static_library builds.
814 ['OS=="linux"', { 814 ['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', {
815 'linux_use_bundled_gold%': 1, 815 'linux_use_bundled_gold%': 1,
816 }, { 816 }, {
817 'linux_use_bundled_gold%': 0, 817 'linux_use_bundled_gold%': 0,
818 }], 818 }],
819 819
820 # linux_use_bundled_binutils: whether to use the binary binutils 820 # linux_use_bundled_binutils: whether to use the binary binutils
821 # checked into third_party/binutils. These are not multi-arch so cannot 821 # checked into third_party/binutils. These are not multi-arch so cannot
822 # be used except on x86 and x86-64 (the only two architectures which 822 # be used except on x86 and x86-64 (the only two architectures which
823 # are currently checked in). Force this off via GYP_DEFINES when you 823 # are currently checke in). Force this off via GYP_DEFINES when you
824 # are using a custom toolchain and need to control -B in cflags. 824 # are using a custom toolchain and need to control -B in cflags.
825 ['OS=="linux" and (target_arch=="x64")', { 825 ['OS=="linux" and (target_arch=="x64")', {
826 'linux_use_bundled_binutils%': 1, 826 'linux_use_bundled_binutils%': 1,
827 }, { 827 }, {
828 'linux_use_bundled_binutils%': 0, 828 'linux_use_bundled_binutils%': 0,
829 }], 829 }],
830 830
831 # linux_use_gold_flags: whether to use build flags that rely on gold. 831 # linux_use_gold_flags: whether to use build flags that rely on gold.
832 # On by default for x64 Linux. 832 # On by default for x64 Linux.
833 ['OS=="linux" and target_arch=="x64"', { 833 ['OS=="linux" and target_arch=="x64"', {
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
1481 'clang_xcode%': 1, 1481 'clang_xcode%': 1,
1482 }], 1482 }],
1483 # Enable the Syzygy optimization step for the official builds. 1483 # Enable the Syzygy optimization step for the official builds.
1484 ['OS=="win" and buildtype=="Official" and syzyasan!=1', { 1484 ['OS=="win" and buildtype=="Official" and syzyasan!=1', {
1485 'syzygy_optimize%': 1, 1485 'syzygy_optimize%': 1,
1486 }, { 1486 }, {
1487 'syzygy_optimize%': 0, 1487 'syzygy_optimize%': 0,
1488 }], 1488 }],
1489 # Get binutils version so we can enable debug fission if we can. 1489 # Get binutils version so we can enable debug fission if we can.
1490 ['os_posix==1 and OS!="mac" and OS!="ios"', { 1490 ['os_posix==1 and OS!="mac" and OS!="ios"', {
1491 # 32-bit hosts have to be 32-bit userland with a 64-bit kernel, so that
1492 # 64-bit gold gets used. 32-bit gold will run out of address space.
1493 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin',
1494 'conditions': [ 1491 'conditions': [
1495 # compiler_version doesn't work with clang 1492 # compiler_version doesn't work with clang
1496 # TODO(mithro): Land https://codereview.chromium.org/199793014/ so 1493 # TODO(mithro): Land https://codereview.chromium.org/199793014/ so
1497 # compiler_version works with clang. 1494 # compiler_version works with clang.
1498 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so 1495 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so
1499 # that it takes effect here. 1496 # that it takes effect here.
1500 ['clang==0 and asan==0 and lsan==0 and tsan==0 and msan==0 and ubsan== 0 and ubsan_vptr==0', { 1497 ['clang==0 and asan==0 and lsan==0 and tsan==0 and msan==0 and ubsan== 0 and ubsan_vptr==0', {
1501 'binutils_version%': '<!pymod_do_main(compiler_version target assemb ler)', 1498 'binutils_version%': '<!pymod_do_main(compiler_version target assemb ler)',
1502 }], 1499 }],
1503 # On Android we know the binutils version in the toolchain. 1500 # On Android we know the binutils version in the toolchain.
1504 ['OS=="android"', { 1501 ['OS=="android"', {
1505 'binutils_version%': 222, 1502 'binutils_version%': 222,
1506 }], 1503 }],
1504 ['host_arch=="x64"', {
1505 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin',
1506 }],
1507 ['host_arch=="ia32"', {
1508 'binutils_dir%': 'third_party/binutils/Linux_ia32/Release/bin',
1509 }],
1507 # Our version of binutils in third_party/binutils 1510 # Our version of binutils in third_party/binutils
1508 ['linux_use_bundled_binutils==1', { 1511 ['linux_use_bundled_binutils==1', {
1509 'binutils_version%': 224, 1512 'binutils_version%': 224,
1510 }], 1513 }],
1511 ], 1514 ],
1512 }, { 1515 }, {
1513 'binutils_version%': 0, 1516 'binutils_version%': 0,
1514 }], 1517 }],
1515 # The version of GCC in use, set later in platforms that use GCC and have 1518 # The version of GCC in use, set later in platforms that use GCC and have
1516 # not explicitly chosen to build with clang. Currently, this means all 1519 # not explicitly chosen to build with clang. Currently, this means all
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 'CXX%': '<(CXX)', 1572 'CXX%': '<(CXX)',
1570 }], 1573 }],
1571 # All Chrome builds have breakpad symbols, but only process the 1574 # All Chrome builds have breakpad symbols, but only process the
1572 # symbols from official builds. 1575 # symbols from official builds.
1573 ['(branding=="Chrome" and buildtype=="Official")', { 1576 ['(branding=="Chrome" and buildtype=="Official")', {
1574 'linux_dump_symbols%': 1, 1577 'linux_dump_symbols%': 1,
1575 1578
1576 # Omit unwind support in official release builds to save space. We 1579 # Omit unwind support in official release builds to save space. We
1577 # can use breakpad for these builds. 1580 # can use breakpad for these builds.
1578 'release_unwind_tables%': 0, 1581 'release_unwind_tables%': 0,
1582
1583 'conditions': [
1584 # For official builds, use a 64-bit linker to avoid running out
1585 # of address space. The buildbots should have a 64-bit kernel
1586 # and a 64-bit libc installed.
1587 ['host_arch=="ia32" and target_arch=="ia32"', {
1588 'linux_use_bundled_gold%': '1',
1589 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin',
1590 }],
1591 ],
1579 }], 1592 }],
1580 ], 1593 ],
1581 }], # os_posix==1 and OS!="mac" and OS!="ios" 1594 }], # os_posix==1 and OS!="mac" and OS!="ios"
1582 ['OS=="ios"', { 1595 ['OS=="ios"', {
1583 'disable_nacl%': 1, 1596 'disable_nacl%': 1,
1584 'enable_background%': 0, 1597 'enable_background%': 0,
1585 'icu_use_data_file_flag%': 1, 1598 'icu_use_data_file_flag%': 1,
1586 'enable_web_speech%': 0, 1599 'enable_web_speech%': 0,
1587 'use_system_libxml%': 1, 1600 'use_system_libxml%': 1,
1588 'use_system_sqlite%': 1, 1601 'use_system_sqlite%': 1,
(...skipping 2595 matching lines...) Expand 10 before | Expand all | Expand 10 after
4184 'cflags': [ 4197 'cflags': [
4185 # Avoids errors with current NDK: 4198 # Avoids errors with current NDK:
4186 # "third_party/android_tools/ndk/toolchains/arm-linux-androide abi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/include/a rm_neon.h:3426:3: error: argument must be a constant" 4199 # "third_party/android_tools/ndk/toolchains/arm-linux-androide abi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/include/a rm_neon.h:3426:3: error: argument must be a constant"
4187 '-finstrument-functions-exclude-file-list=arm_neon.h,Saturated ArithmeticARM.h', 4200 '-finstrument-functions-exclude-file-list=arm_neon.h,Saturated ArithmeticARM.h',
4188 ], 4201 ],
4189 }], 4202 }],
4190 ], 4203 ],
4191 }], 4204 }],
4192 ['linux_dump_symbols==1', { 4205 ['linux_dump_symbols==1', {
4193 'cflags': [ '-g' ], 4206 'cflags': [ '-g' ],
4207 'conditions': [
4208 ['OS=="linux" and host_arch=="ia32" and linux_use_bundled_gold==0' , {
4209 'target_conditions': [
4210 ['_toolset=="target"', {
4211 'ldflags': [
4212 # Attempt to use less memory to prevent the linker from
4213 # running out of address space. Considering installing a
4214 # 64-bit kernel and switching to a 64-bit linker.
4215 '-Wl,--no-keep-memory',
4216 ],
4217 }],
4218 ],
4219 }],
4220 ],
4194 }], 4221 }],
4195 ['use_allocator!="tcmalloc"', { 4222 ['use_allocator!="tcmalloc"', {
4196 'defines': ['NO_TCMALLOC'], 4223 'defines': ['NO_TCMALLOC'],
4197 }], 4224 }],
4198 ['linux_use_gold_flags==1', { 4225 ['linux_use_gold_flags==1', {
4199 # Newer gccs and clangs support -fuse-ld, use the flag to force gold 4226 # Newer gccs and clangs support -fuse-ld, use the flag to force gold
4200 # selection. 4227 # selection.
4201 # gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Option s.html 4228 # gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Option s.html
4202 'ldflags': [ '-fuse-ld=gold', ], 4229 'ldflags': [ '-fuse-ld=gold', ],
4203 4230
(...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after
5678 # settings in target dicts. SYMROOT is a special case, because many other 5705 # settings in target dicts. SYMROOT is a special case, because many other
5679 # Xcode variables depend on it, including variables such as 5706 # Xcode variables depend on it, including variables such as
5680 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 5707 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
5681 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 5708 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
5682 # files to appear (when present) in the UI as actual files and not red 5709 # files to appear (when present) in the UI as actual files and not red
5683 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 5710 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
5684 # and therefore SYMROOT, needs to be set at the project level. 5711 # and therefore SYMROOT, needs to be set at the project level.
5685 'SYMROOT': '<(DEPTH)/xcodebuild', 5712 'SYMROOT': '<(DEPTH)/xcodebuild',
5686 }, 5713 },
5687 } 5714 }
OLDNEW
« no previous file with comments | « no previous file | build/config/compiler/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698