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

Side by Side Diff: build/toolchain.gypi

Issue 896703003: [linux] Improve link time with Chromium-bundled binutils. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use concurrent linking in debug builds only. Cleanup variables. Created 5 years, 10 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 | « DEPS ('k') | third_party/binutils/Linux_ia32/binutils.tar.bz2.sha1 » ('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 2013 the V8 project authors. All rights reserved. 1 # Copyright 2013 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 'v8_toolset_for_d8%': 'target', 79 'v8_toolset_for_d8%': 'target',
80 80
81 'host_os%': '<(OS)', 81 'host_os%': '<(OS)',
82 'werror%': '-Werror', 82 'werror%': '-Werror',
83 # For a shared library build, results in "libv8-<(soname_version).so". 83 # For a shared library build, results in "libv8-<(soname_version).so".
84 'soname_version%': '', 84 'soname_version%': '',
85 85
86 # Allow to suppress the array bounds warning (default is no suppression). 86 # Allow to suppress the array bounds warning (default is no suppression).
87 'wno_array_bounds%': '', 87 'wno_array_bounds%': '',
88 88
89 # Override where to find binutils
90 'binutils_dir%': '',
91
92 'conditions': [
93 ['OS=="linux" and host_arch=="x64"', {
94 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin',
95 }],
96 ['OS=="linux" and host_arch=="ia32"', {
97 'binutils_dir%': 'third_party/binutils/Linux_ia32/Release/bin',
98 }],
99
100 # linux_use_bundled_gold: whether to use the gold linker binary checked
101 # into third_party/binutils. Force this off via GYP_DEFINES when you
102 # are using a custom toolchain and need to control -B in ldflags.
103 # Do not use 32-bit gold on 32-bit hosts as it runs out address space
104 # for component=static_library builds.
105 ['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', {
106 'linux_use_bundled_gold%': 1,
107 }, {
108 'linux_use_bundled_gold%': 0,
109 }],
110 # linux_use_bundled_binutils: whether to use the binary binutils
111 # checked into third_party/binutils. These are not multi-arch so cannot
112 # be used except on x86 and x86-64 (the only two architectures which
113 # are currently checke in). Force this off via GYP_DEFINES when you
114 # are using a custom toolchain and need to control -B in cflags.
115 ['OS=="linux" and (target_arch=="ia32" or target_arch=="x64")', {
116 'linux_use_bundled_binutils%': 1,
117 }, {
118 'linux_use_bundled_binutils%': 0,
119 }],
120 # linux_use_gold_flags: whether to use build flags that rely on gold.
121 # On by default for x64 Linux.
122 ['OS=="linux" and target_arch=="x64"', {
123 'linux_use_gold_flags%': 1,
124 }, {
125 'linux_use_gold_flags%': 0,
126 }],
127 ],
128
89 # Link-Time Optimizations 129 # Link-Time Optimizations
90 'use_lto%': 0, 130 'use_lto%': 0,
91 131
92 'variables': { 132 'variables': {
93 # This is set when building the Android WebView inside the Android build 133 # This is set when building the Android WebView inside the Android build
94 # system, using the 'android' gyp backend. 134 # system, using the 'android' gyp backend.
95 'android_webview_build%': 0, 135 'android_webview_build%': 0,
96 }, 136 },
97 # Copy it out one scope. 137 # Copy it out one scope.
98 'android_webview_build%': '<(android_webview_build)', 138 'android_webview_build%': '<(android_webview_build)',
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 ], 830 ],
791 'cflags': [ 831 'cflags': [
792 '-mx32', 832 '-mx32',
793 # Inhibit warning if long long type is used. 833 # Inhibit warning if long long type is used.
794 '-Wno-long-long', 834 '-Wno-long-long',
795 ], 835 ],
796 'ldflags': [ 836 'ldflags': [
797 '-mx32', 837 '-mx32',
798 ], 838 ],
799 }], # v8_target_arch=="x32" 839 }], # v8_target_arch=="x32"
840 ['linux_use_gold_flags==1', {
841 # Newer gccs and clangs support -fuse-ld, use the flag to force gold
842 # selection.
843 # gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.ht ml
844 'ldflags': [ '-fuse-ld=gold', ],
845 }],
846 ['linux_use_bundled_binutils==1', {
847 'cflags': [
848 '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)',
849 ],
850 }],
851 ['linux_use_bundled_gold==1', {
852 # Put our binutils, which contains gold in the search path. We pass
853 # the path to gold to the compiler. gyp leaves unspecified what the
854 # cwd is when running the compiler, so the normal gyp path-munging
855 # fails us. This hack gets the right path.
856 'ldflags': [
857 '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)',
858 ],
859 }],
800 ['OS=="win"', { 860 ['OS=="win"', {
801 'defines': [ 861 'defines': [
802 'WIN32', 862 'WIN32',
803 ], 863 ],
804 # 4351: VS 2005 and later are warning us that they've fixed a bug 864 # 4351: VS 2005 and later are warning us that they've fixed a bug
805 # present in VS 2003 and earlier. 865 # present in VS 2003 and earlier.
806 'msvs_disabled_warnings': [4351], 866 'msvs_disabled_warnings': [4351],
807 'msvs_configuration_attributes': { 867 'msvs_configuration_attributes': {
808 'OutputDirectory': '<(DEPTH)\\build\\$(ConfigurationName)', 868 'OutputDirectory': '<(DEPTH)\\build\\$(ConfigurationName)',
809 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', 869 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 ['android_full_debug==0', { 1136 ['android_full_debug==0', {
1077 # Disable full debug if we want a faster v8 in a debug build. 1137 # Disable full debug if we want a faster v8 in a debug build.
1078 # TODO(2304): pass DISABLE_DEBUG_ASSERT instead of hiding DEBUG. 1138 # TODO(2304): pass DISABLE_DEBUG_ASSERT instead of hiding DEBUG.
1079 'defines!': [ 1139 'defines!': [
1080 'DEBUG', 1140 'DEBUG',
1081 'ENABLE_SLOW_DCHECKS', 1141 'ENABLE_SLOW_DCHECKS',
1082 ], 1142 ],
1083 }], 1143 }],
1084 ], 1144 ],
1085 }], 1145 }],
1146 ['linux_use_gold_flags==1', {
1147 'target_conditions': [
1148 ['_toolset=="target"', {
1149 'ldflags': [
1150 # Experimentation found that using four linking threads
1151 # saved ~20% of link time.
1152 # https://groups.google.com/a/chromium.org/group/chromium-dev/ browse_thread/thread/281527606915bb36
1153 # Only apply this to the target linker, since the host
1154 # linker might not be gold, but isn't used much anyway.
1155 '-Wl,--threads',
1156 '-Wl,--thread-count=4',
1157 ],
1158 }],
1159 ],
1160 }],
1086 ], 1161 ],
1087 }, # DebugBaseCommon 1162 }, # DebugBaseCommon
1088 'Debug': { 1163 'Debug': {
1089 'inherit_from': ['DebugBaseCommon'], 1164 'inherit_from': ['DebugBaseCommon'],
1090 'conditions': [ 1165 'conditions': [
1091 ['v8_optimized_debug==0', { 1166 ['v8_optimized_debug==0', {
1092 'inherit_from': ['DebugBase0'], 1167 'inherit_from': ['DebugBase0'],
1093 }, { 1168 }, {
1094 'inherit_from': ['DebugBase1'], 1169 'inherit_from': ['DebugBase1'],
1095 }], 1170 }],
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1171 ['v8_enable_slow_dchecks==1', { 1246 ['v8_enable_slow_dchecks==1', {
1172 'defines': [ 1247 'defines': [
1173 'ENABLE_SLOW_DCHECKS', 1248 'ENABLE_SLOW_DCHECKS',
1174 ], 1249 ],
1175 }], 1250 }],
1176 ], # conditions 1251 ], # conditions
1177 }, # Release 1252 }, # Release
1178 }, # configurations 1253 }, # configurations
1179 }, # target_defaults 1254 }, # target_defaults
1180 } 1255 }
OLDNEW
« no previous file with comments | « DEPS ('k') | third_party/binutils/Linux_ia32/binutils.tar.bz2.sha1 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698