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

Side by Side Diff: build/common.gypi

Issue 450843002: clang supports -fuse-ld these days, remove a few special cases. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: better Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « build/android/arm-linux-androideabi-gold/ld ('k') | 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 3787 matching lines...) Expand 10 before | Expand all | Expand 10 after
3798 '-fno-tree-loop-optimize', 3798 '-fno-tree-loop-optimize',
3799 '-fno-move-loop-invariants', 3799 '-fno-move-loop-invariants',
3800 '-fno-caller-saves', 3800 '-fno-caller-saves',
3801 '-Wno-psabi', 3801 '-Wno-psabi',
3802 ], 3802 ],
3803 'cflags': [ 3803 'cflags': [
3804 # TODO(hans) Enable integrated-as (crbug.com/124610). 3804 # TODO(hans) Enable integrated-as (crbug.com/124610).
3805 '-no-integrated-as', 3805 '-no-integrated-as',
3806 '-B<(android_toolchain)', # Else /usr/bin/as gets pic ked up. 3806 '-B<(android_toolchain)', # Else /usr/bin/as gets pic ked up.
3807 ], 3807 ],
3808
3809 'ldflags!': [
3810 # Clang does not support the following options.
3811 '-fuse-ld=gold',
3812 ],
3813 'ldflags': [ 3808 'ldflags': [
3814 # As long as -fuse-ld=gold doesn't work, add a dummy d irectory 3809 # Let clang can find the ld.gold in the NDK.
3815 # with an 'ld' that redirects to gold, so that clang u ses gold. 3810 '--gcc-toolchain=<(android_toolchain)/..',
3816 '-B<!(cd <(DEPTH) && pwd -P)/build/android/arm-linux-a ndroideabi-gold',
3817 ], 3811 ],
3818 }], 3812 }],
3819 ['asan==1', { 3813 ['asan==1', {
3820 'cflags': [ 3814 'cflags': [
3821 '-marm', # Required for frame pointer based stack trac es. 3815 '-marm', # Required for frame pointer based stack trac es.
3822 ], 3816 ],
3823 }], 3817 }],
3824 ], 3818 ],
3825 }], 3819 }],
3826 ['chromecast==1', { 3820 ['chromecast==1', {
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
4175 ], 4169 ],
4176 }], 4170 }],
4177 ], 4171 ],
4178 }], 4172 }],
4179 ], 4173 ],
4180 }], 4174 }],
4181 ['use_allocator!="tcmalloc"', { 4175 ['use_allocator!="tcmalloc"', {
4182 'defines': ['NO_TCMALLOC'], 4176 'defines': ['NO_TCMALLOC'],
4183 }], 4177 }],
4184 ['linux_use_gold_flags==1', { 4178 ['linux_use_gold_flags==1', {
4179 # Newer gccs and clangs support -fuse-ld, use the flag to force gold
4180 # selection.
4181 # gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Option s.html
4182 'ldflags': [ '-fuse-ld=gold', ],
4183
4185 'target_conditions': [ 4184 'target_conditions': [
4186 ['_toolset=="target"', { 4185 ['_toolset=="target"', {
4187 'ldflags': [ 4186 'ldflags': [
4188 # Experimentation found that using four linking threads 4187 # Experimentation found that using four linking threads
4189 # saved ~20% of link time. 4188 # saved ~20% of link time.
4190 # https://groups.google.com/a/chromium.org/group/chromium-dev/ browse_thread/thread/281527606915bb36 4189 # https://groups.google.com/a/chromium.org/group/chromium-dev/ browse_thread/thread/281527606915bb36
4191 # Only apply this to the target linker, since the host 4190 # Only apply this to the target linker, since the host
4192 # linker might not be gold, but isn't used much anyway. 4191 # linker might not be gold, but isn't used much anyway.
4193 # TODO(raymes): Disable threading because gold is frequently 4192 # TODO(raymes): Disable threading because gold is frequently
4194 # crashing on the bots: crbug.com/161942. 4193 # crashing on the bots: crbug.com/161942.
(...skipping 10 matching lines...) Expand all
4205 # There seems to be a conflict of --icf and -pie 4204 # There seems to be a conflict of --icf and -pie
4206 # in gold which can generate crashy binaries. As 4205 # in gold which can generate crashy binaries. As
4207 # a security measure, -pie takes precedence for 4206 # a security measure, -pie takes precedence for
4208 # now. 4207 # now.
4209 #'-Wl,--icf=safe', 4208 #'-Wl,--icf=safe',
4210 '-Wl,--icf=none', 4209 '-Wl,--icf=none',
4211 ], 4210 ],
4212 }], 4211 }],
4213 ], 4212 ],
4214 }], 4213 }],
4215 # Newer gcc's support -fuse-ld, use the flag to force gold
4216 # selection.
4217 # gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Opti ons.html
4218 # TODO(mithro): Watch for clang support at following thread:
4219 # http://clang-developers.42468.n3.nabble.com/Adding-fuse-ld-suppo rt-to-clang-td4032180.html
4220 ['gcc_version>=48 and clang==0', {
4221 'target_conditions': [
4222 ['_toolset=="target"', {
4223 'ldflags': [
4224 '-fuse-ld=gold',
4225 ],
4226 }],
4227 ],
4228 }],
4229 ['host_gcc_version>=48 and clang==0', {
4230 'target_conditions': [
4231 ['_toolset=="host"', {
4232 'ldflags': [
4233 '-fuse-ld=gold',
4234 ],
4235 }],
4236 ],
4237 }],
4238 ], 4214 ],
4239 }], 4215 }],
4240 ['linux_use_bundled_binutils==1', { 4216 ['linux_use_bundled_binutils==1', {
4241 'cflags': [ 4217 'cflags': [
4242 '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)', 4218 '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)',
4243 ], 4219 ],
4244 }], 4220 }],
4245 ['linux_use_bundled_gold==1', { 4221 ['linux_use_bundled_gold==1', {
4246 # Put our binutils, which contains gold in the search path. We pass 4222 # Put our binutils, which contains gold in the search path. We pass
4247 # the path to gold to the compiler. gyp leaves unspecified what the 4223 # the path to gold to the compiler. gyp leaves unspecified what the
(...skipping 1432 matching lines...) Expand 10 before | Expand all | Expand 10 after
5680 # settings in target dicts. SYMROOT is a special case, because many other 5656 # settings in target dicts. SYMROOT is a special case, because many other
5681 # Xcode variables depend on it, including variables such as 5657 # Xcode variables depend on it, including variables such as
5682 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 5658 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
5683 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 5659 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
5684 # files to appear (when present) in the UI as actual files and not red 5660 # files to appear (when present) in the UI as actual files and not red
5685 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 5661 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
5686 # and therefore SYMROOT, needs to be set at the project level. 5662 # and therefore SYMROOT, needs to be set at the project level.
5687 'SYMROOT': '<(DEPTH)/xcodebuild', 5663 'SYMROOT': '<(DEPTH)/xcodebuild',
5688 }, 5664 },
5689 } 5665 }
OLDNEW
« no previous file with comments | « build/android/arm-linux-androideabi-gold/ld ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698