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

Side by Side Diff: build/common.gypi

Issue 247623003: Linux: Detect host g++ version as well as target g++ version. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 8 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 | « no previous file | build/compiler_version.py » ('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 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 }], 1352 }],
1353 # Get binutils version so we can enable debug fission if we can. 1353 # Get binutils version so we can enable debug fission if we can.
1354 ['os_posix==1 and OS!="mac" and OS!="ios"', { 1354 ['os_posix==1 and OS!="mac" and OS!="ios"', {
1355 'conditions': [ 1355 'conditions': [
1356 # compiler_version doesn't work with clang 1356 # compiler_version doesn't work with clang
1357 # TODO(mithro): Land https://codereview.chromium.org/199793014/ so 1357 # TODO(mithro): Land https://codereview.chromium.org/199793014/ so
1358 # compiler_version works with clang. 1358 # compiler_version works with clang.
1359 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so 1359 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so
1360 # that it takes effect here. 1360 # that it takes effect here.
1361 ['clang==0 and asan==0 and lsan==0 and tsan==0 and msan==0', { 1361 ['clang==0 and asan==0 and lsan==0 and tsan==0 and msan==0', {
1362 'binutils_version%': '<!pymod_do_main(compiler_version assembler)', 1362 'binutils_version%': '<!pymod_do_main(compiler_version target assemb ler)',
1363 }], 1363 }],
1364 # On Android we know the binutils version in the toolchain. 1364 # On Android we know the binutils version in the toolchain.
1365 ['OS=="android"', { 1365 ['OS=="android"', {
1366 'binutils_version%': 222, 1366 'binutils_version%': 222,
1367 }], 1367 }],
1368 ['host_arch=="x64"', { 1368 ['host_arch=="x64"', {
1369 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin', 1369 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin',
1370 }], 1370 }],
1371 ['host_arch=="ia32"', { 1371 ['host_arch=="ia32"', {
1372 'binutils_dir%': 'third_party/binutils/Linux_ia32/Release/bin', 1372 'binutils_dir%': 'third_party/binutils/Linux_ia32/Release/bin',
1373 }], 1373 }],
1374 # Our version of binutils in third_party/binutils 1374 # Our version of binutils in third_party/binutils
1375 ['linux_use_bundled_binutils==1', { 1375 ['linux_use_bundled_binutils==1', {
1376 'binutils_version%': 224, 1376 'binutils_version%': 224,
1377 }], 1377 }],
1378 ], 1378 ],
1379 }, { 1379 }, {
1380 'binutils_version%': 0, 1380 'binutils_version%': 0,
1381 }], 1381 }],
1382 # The version of GCC in use, set later in platforms that use GCC and have 1382 # The version of GCC in use, set later in platforms that use GCC and have
1383 # not explicitly chosen to build with clang. Currently, this means all 1383 # not explicitly chosen to build with clang. Currently, this means all
1384 # platforms except Windows, Mac and iOS. 1384 # platforms except Windows, Mac and iOS.
1385 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that 1385 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that
1386 # it takes effect here. 1386 # it takes effect here.
1387 ['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', { 1387 ['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', {
1388 'conditions': [ 1388 'conditions': [
1389 ['OS=="android"', { 1389 ['OS=="android"', {
1390 # We directly set the gcc_version since we know what we use. 1390 # We directly set the gcc versions since we know what we use.
1391 'conditions': [ 1391 'conditions': [
1392 ['target_arch=="x64" or target_arch=="arm64"', { 1392 ['target_arch=="x64" or target_arch=="arm64"', {
1393 'host_gcc_version%': 48,
1393 'gcc_version%': 48, 1394 'gcc_version%': 48,
1394 }, { 1395 }, {
1396 'host_gcc_version%': 46,
1395 'gcc_version%': 46, 1397 'gcc_version%': 46,
1396 }], 1398 }],
1397 ], 1399 ],
1398 }, { 1400 }, {
1399 'gcc_version%': '<!pymod_do_main(compiler_version)', 1401 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler )',
1402 'gcc_version%': '<!pymod_do_main(compiler_version target compiler)',
1400 }], 1403 }],
1401 ], 1404 ],
1402 }, { 1405 }, {
1406 'host_gcc_version%': 0,
1403 'gcc_version%': 0, 1407 'gcc_version%': 0,
1404 }], 1408 }],
1405 ['OS=="win" and "<!pymod_do_main(dir_exists <(windows_sdk_default_path))"= ="True"', { 1409 ['OS=="win" and "<!pymod_do_main(dir_exists <(windows_sdk_default_path))"= ="True"', {
1406 'windows_sdk_path%': '<(windows_sdk_default_path)', 1410 'windows_sdk_path%': '<(windows_sdk_default_path)',
1407 }, { 1411 }, {
1408 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0', 1412 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
1409 }], 1413 }],
1410 ['OS=="win" and "<!pymod_do_main(dir_exists <(directx_sdk_default_path))"= ="True"', { 1414 ['OS=="win" and "<!pymod_do_main(dir_exists <(directx_sdk_default_path))"= ="True"', {
1411 'directx_sdk_path%': '<(directx_sdk_default_path)', 1415 'directx_sdk_path%': '<(directx_sdk_default_path)',
1412 }, { 1416 }, {
(...skipping 2429 matching lines...) Expand 10 before | Expand all | Expand 10 after
3842 ], 3846 ],
3843 }], 3847 }],
3844 ], 3848 ],
3845 }], 3849 }],
3846 # Newer gcc's support -fuse-ld, use the flag to force gold 3850 # Newer gcc's support -fuse-ld, use the flag to force gold
3847 # selection. 3851 # selection.
3848 # gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Opti ons.html 3852 # gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Opti ons.html
3849 # TODO(mithro): Watch for clang support at following thread: 3853 # TODO(mithro): Watch for clang support at following thread:
3850 # http://clang-developers.42468.n3.nabble.com/Adding-fuse-ld-suppo rt-to-clang-td4032180.html 3854 # http://clang-developers.42468.n3.nabble.com/Adding-fuse-ld-suppo rt-to-clang-td4032180.html
3851 ['gcc_version>=48', { 3855 ['gcc_version>=48', {
3852 'cflags': [ 3856 'target_conditions': [
3853 '-fuse-ld=gold', 3857 ['_toolset=="target"', {
3858 'cflags': [
3859 '-fuse-ld=gold',
3860 ],
3861 'ldflags': [
3862 '-fuse-ld=gold',
3863 ],
3864 }],
3854 ], 3865 ],
3855 'ldflags': [ 3866 }],
3856 '-fuse-ld=gold', 3867 ['host_gcc_version>=48', {
3868 'target_conditions': [
3869 ['_toolset=="host"', {
3870 'cflags': [
3871 '-fuse-ld=gold',
3872 ],
3873 'ldflags': [
3874 '-fuse-ld=gold',
3875 ],
3876 }],
3857 ], 3877 ],
3858 }] 3878 }],
3859 ], 3879 ],
3860 }], 3880 }],
3861 ['linux_use_bundled_binutils==1', { 3881 ['linux_use_bundled_binutils==1', {
3862 'cflags': [ 3882 'cflags': [
3863 '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)', 3883 '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)',
3864 ], 3884 ],
3865 }], 3885 }],
3866 ['linux_use_bundled_gold==1', { 3886 ['linux_use_bundled_gold==1', {
3867 # Put our binutils, which contains gold in the search path. We pass 3887 # Put our binutils, which contains gold in the search path. We pass
3868 # the path to gold to the compiler. gyp leaves unspecified what the 3888 # the path to gold to the compiler. gyp leaves unspecified what the
(...skipping 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after
5199 # settings in target dicts. SYMROOT is a special case, because many other 5219 # settings in target dicts. SYMROOT is a special case, because many other
5200 # Xcode variables depend on it, including variables such as 5220 # Xcode variables depend on it, including variables such as
5201 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 5221 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
5202 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 5222 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
5203 # files to appear (when present) in the UI as actual files and not red 5223 # files to appear (when present) in the UI as actual files and not red
5204 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 5224 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
5205 # and therefore SYMROOT, needs to be set at the project level. 5225 # and therefore SYMROOT, needs to be set at the project level.
5206 'SYMROOT': '<(DEPTH)/xcodebuild', 5226 'SYMROOT': '<(DEPTH)/xcodebuild',
5207 }, 5227 },
5208 } 5228 }
OLDNEW
« no previous file with comments | « no previous file | build/compiler_version.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698