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

Side by Side Diff: build/common.gypi

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