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

Side by Side Diff: build/common.gypi

Issue 9316110: linux: add a use_gold flag that defaults to on (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 ['OS=="win" and MSVS_VERSION=="2010"', { 370 ['OS=="win" and MSVS_VERSION=="2010"', {
371 'chromium_win_pch%': 1 371 'chromium_win_pch%': 1
372 }], 372 }],
373 373
374 ['use_aura==1 or chromeos==1', { 374 ['use_aura==1 or chromeos==1', {
375 'enable_plugin_installation%': 0, 375 'enable_plugin_installation%': 0,
376 }, { 376 }, {
377 'enable_plugin_installation%': 1, 377 'enable_plugin_installation%': 1,
378 }], 378 }],
379 379
380 # Set to 0 to not use third_party/gold as the linker. 380 # linux_use_gold_binary: whether to use the binary checked into
381 # third_party/gold.
382 # linux_use_gold: whether to use build flags that rely on gold.
Lei Zhang 2012/02/04 01:09:13 how about "linux_use_gold_flags"
Evan Martin 2012/02/08 18:33:53 Done.
381 # On by default for x64 Linux. Off for ChromeOS as cross-compiling 383 # On by default for x64 Linux. Off for ChromeOS as cross-compiling
382 # makes things complicated. 384 # makes things complicated.
383 ['chromeos==0 and host_arch=="x64"', { 385 ['chromeos==0 and host_arch=="x64"', {
384 'linux_use_gold_binary%': 1, 386 'linux_use_gold_binary%': 1,
387 'linux_use_gold%': 1,
385 }, { 388 }, {
386 'linux_use_gold_binary%': 0, 389 'linux_use_gold_binary%': 0,
390 'linux_use_gold%': 0,
387 }], 391 }],
388 ], 392 ],
389 }, 393 },
390 394
391 # Copy conditionally-set variables out one scope. 395 # Copy conditionally-set variables out one scope.
392 'branding%': '<(branding)', 396 'branding%': '<(branding)',
393 'buildtype%': '<(buildtype)', 397 'buildtype%': '<(buildtype)',
394 'target_arch%': '<(target_arch)', 398 'target_arch%': '<(target_arch)',
395 'host_arch%': '<(host_arch)', 399 'host_arch%': '<(host_arch)',
396 'library%': 'static_library', 400 'library%': 'static_library',
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 'input_speech%': '<(input_speech)', 441 'input_speech%': '<(input_speech)',
438 'notifications%': '<(notifications)', 442 'notifications%': '<(notifications)',
439 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)', 443 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
440 'asan%': '<(asan)', 444 'asan%': '<(asan)',
441 'order_text_section%': '<(order_text_section)', 445 'order_text_section%': '<(order_text_section)',
442 'enable_register_protocol_handler%': '<(enable_register_protocol_handler)', 446 'enable_register_protocol_handler%': '<(enable_register_protocol_handler)',
443 'enable_web_intents%': '<(enable_web_intents)', 447 'enable_web_intents%': '<(enable_web_intents)',
444 'enable_web_intents_tag%': '<(enable_web_intents_tag)', 448 'enable_web_intents_tag%': '<(enable_web_intents_tag)',
445 'enable_plugin_installation%': '<(enable_plugin_installation)', 449 'enable_plugin_installation%': '<(enable_plugin_installation)',
446 'linux_use_gold_binary%': '<(linux_use_gold_binary)', 450 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
451 'linux_use_gold%': '<(linux_use_gold)',
447 'use_canvas_skia_skia%': '<(use_canvas_skia_skia)', 452 'use_canvas_skia_skia%': '<(use_canvas_skia_skia)',
448 # Whether to build for Wayland display server 453 # Whether to build for Wayland display server
449 'use_wayland%': 0, 454 'use_wayland%': 0,
450 455
451 # Use system yasm instead of bundled one. 456 # Use system yasm instead of bundled one.
452 'use_system_yasm%': 0, 457 'use_system_yasm%': 0,
453 458
454 # Default to enabled PIE; this is important for ASLR but we need to be 459 # Default to enabled PIE; this is important for ASLR but we need to be
455 # able to turn it off for remote debugging on Chromium OS 460 # able to turn it off for remote debugging on Chromium OS
456 'linux_disable_pie%': 0, 461 'linux_disable_pie%': 0,
(...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1702 'cflags!': [ 1707 'cflags!': [
1703 '-fno-ident', 1708 '-fno-ident',
1704 ], 1709 ],
1705 }], 1710 }],
1706 ['profiling==1', { 1711 ['profiling==1', {
1707 'cflags': [ 1712 'cflags': [
1708 '-fno-omit-frame-pointer', 1713 '-fno-omit-frame-pointer',
1709 '-g', 1714 '-g',
1710 ], 1715 ],
1711 }], 1716 }],
1712 # At gyp time, we test the linker for ICF support; this flag 1717 ],
1713 # is then provided to us by gyp. (Currently only gold supports
1714 # an --icf flag.)
1715 # There seems to be a conflict of --icf and -pie in gold which
1716 # can generate crashy binaries. As a security measure, -pie
1717 # takes precendence for now.
1718 ['LINKER_SUPPORTS_ICF==1 and release_valgrind_build==0', {
1719 'target_conditions': [
1720 ['_toolset=="target"', {
1721 'ldflags': [
1722 #'-Wl,--icf=safe',
1723 '-Wl,--icf=none',
1724 ]
1725 }]
1726 ]
1727 }],
1728 ]
1729 }, 1718 },
1730 }, 1719 },
1731 'variants': { 1720 'variants': {
1732 'coverage': { 1721 'coverage': {
1733 'cflags': ['-fprofile-arcs', '-ftest-coverage'], 1722 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
1734 'ldflags': ['-fprofile-arcs'], 1723 'ldflags': ['-fprofile-arcs'],
1735 }, 1724 },
1736 'profile': { 1725 'profile': {
1737 'cflags': ['-pg', '-g'], 1726 'cflags': ['-pg', '-g'],
1738 'ldflags': ['-pg'], 1727 'ldflags': ['-pg'],
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1984 'variables': {'linux_use_tcmalloc%': 1}, 1973 'variables': {'linux_use_tcmalloc%': 1},
1985 'defines': ['USE_HEAPCHECKER'], 1974 'defines': ['USE_HEAPCHECKER'],
1986 }], 1975 }],
1987 ['linux_use_tcmalloc==0', { 1976 ['linux_use_tcmalloc==0', {
1988 'defines': ['NO_TCMALLOC'], 1977 'defines': ['NO_TCMALLOC'],
1989 }], 1978 }],
1990 ['linux_keep_shadow_stacks==1', { 1979 ['linux_keep_shadow_stacks==1', {
1991 'defines': ['KEEP_SHADOW_STACKS'], 1980 'defines': ['KEEP_SHADOW_STACKS'],
1992 'cflags': ['-finstrument-functions'], 1981 'cflags': ['-finstrument-functions'],
1993 }], 1982 }],
1983 ['linux_use_gold==1', {
Lei Zhang 2012/02/04 01:09:13 Do we need to take |release_valgrind_build| into a
Evan Martin 2012/02/08 18:33:53 Fixed.
1984 'ldflags': [
1985 # There seems to be a conflict of --icf and -pie in gold which
1986 # can generate crashy binaries. As a security measure, -pie
1987 # takes precendence for now.
1988 #'-Wl,--icf=safe',
1989 '-Wl,--icf=none',
1990 ],
1991 }],
1994 ['linux_use_gold_binary==1', { 1992 ['linux_use_gold_binary==1', {
1995 'variables': { 1993 'variables': {
1996 # We pass the path to gold to the compiler. gyp leaves 1994 # We pass the path to gold to the compiler. gyp leaves
1997 # unspecified what the cwd is when running the compiler, 1995 # unspecified what the cwd is when running the compiler,
1998 # so the normal gyp path-munging fails us. This hack 1996 # so the normal gyp path-munging fails us. This hack
1999 # gets the right path. 1997 # gets the right path.
2000 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold', 1998 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold',
2001 }, 1999 },
2002 'ldflags': [ 2000 'ldflags': [
2003 # Put our gold binary in the search path for the linker. 2001 # Put our gold binary in the search path for the linker.
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
2761 # settings in target dicts. SYMROOT is a special case, because many other 2759 # settings in target dicts. SYMROOT is a special case, because many other
2762 # Xcode variables depend on it, including variables such as 2760 # Xcode variables depend on it, including variables such as
2763 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 2761 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
2764 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 2762 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
2765 # files to appear (when present) in the UI as actual files and not red 2763 # files to appear (when present) in the UI as actual files and not red
2766 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 2764 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
2767 # and therefore SYMROOT, needs to be set at the project level. 2765 # and therefore SYMROOT, needs to be set at the project level.
2768 'SYMROOT': '<(DEPTH)/xcodebuild', 2766 'SYMROOT': '<(DEPTH)/xcodebuild',
2769 }, 2767 },
2770 } 2768 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698