OLD | NEW |
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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 ['OS=="win" and MSVS_VERSION=="2010"', { | 380 ['OS=="win" and MSVS_VERSION=="2010"', { |
381 'chromium_win_pch%': 1 | 381 'chromium_win_pch%': 1 |
382 }], | 382 }], |
383 | 383 |
384 ['use_aura==1 or chromeos==1', { | 384 ['use_aura==1 or chromeos==1', { |
385 'enable_plugin_installation%': 0, | 385 'enable_plugin_installation%': 0, |
386 }, { | 386 }, { |
387 'enable_plugin_installation%': 1, | 387 'enable_plugin_installation%': 1, |
388 }], | 388 }], |
389 | 389 |
390 # Set to 0 to not use third_party/gold as the linker. | 390 # linux_use_gold_binary: whether to use the binary checked into |
| 391 # third_party/gold. |
| 392 # linux_use_gold_flags: whether to use build flags that rely on gold. |
391 # On by default for x64 Linux. | 393 # On by default for x64 Linux. |
392 ['host_arch=="x64"', { | 394 ['host_arch=="x64"', { |
393 'linux_use_gold_binary%': 1, | 395 'linux_use_gold_binary%': 1, |
| 396 'linux_use_gold_flags%': 1, |
394 }, { | 397 }, { |
395 'linux_use_gold_binary%': 0, | 398 'linux_use_gold_binary%': 0, |
| 399 'linux_use_gold_flags%': 0, |
396 }], | 400 }], |
397 | 401 |
398 # Enable canvas_skia_skia.cc incrementally on different platforms. | 402 # Enable canvas_skia_skia.cc incrementally on different platforms. |
399 # http://crbug.com/105550 | 403 # http://crbug.com/105550 |
400 ['OS=="win"', { | 404 ['OS=="win"', { |
401 'use_canvas_skia_skia%': 1, | 405 'use_canvas_skia_skia%': 1, |
402 }], | 406 }], |
403 ], | 407 ], |
404 }, | 408 }, |
405 | 409 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 'input_speech%': '<(input_speech)', | 457 'input_speech%': '<(input_speech)', |
454 'notifications%': '<(notifications)', | 458 'notifications%': '<(notifications)', |
455 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)', | 459 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)', |
456 'asan%': '<(asan)', | 460 'asan%': '<(asan)', |
457 'order_text_section%': '<(order_text_section)', | 461 'order_text_section%': '<(order_text_section)', |
458 'enable_register_protocol_handler%': '<(enable_register_protocol_handler)', | 462 'enable_register_protocol_handler%': '<(enable_register_protocol_handler)', |
459 'enable_web_intents%': '<(enable_web_intents)', | 463 'enable_web_intents%': '<(enable_web_intents)', |
460 'enable_web_intents_tag%': '<(enable_web_intents_tag)', | 464 'enable_web_intents_tag%': '<(enable_web_intents_tag)', |
461 'enable_plugin_installation%': '<(enable_plugin_installation)', | 465 'enable_plugin_installation%': '<(enable_plugin_installation)', |
462 'linux_use_gold_binary%': '<(linux_use_gold_binary)', | 466 'linux_use_gold_binary%': '<(linux_use_gold_binary)', |
| 467 'linux_use_gold_flags%': '<(linux_use_gold_flags)', |
463 'use_canvas_skia_skia%': '<(use_canvas_skia_skia)', | 468 'use_canvas_skia_skia%': '<(use_canvas_skia_skia)', |
464 # Whether to build for Wayland display server | 469 # Whether to build for Wayland display server |
465 'use_wayland%': 0, | 470 'use_wayland%': 0, |
466 | 471 |
467 # Use system yasm instead of bundled one. | 472 # Use system yasm instead of bundled one. |
468 'use_system_yasm%': 0, | 473 'use_system_yasm%': 0, |
469 | 474 |
470 # Default to enabled PIE; this is important for ASLR but we need to be | 475 # Default to enabled PIE; this is important for ASLR but we need to be |
471 # able to turn it off for remote debugging on Chromium OS | 476 # able to turn it off for remote debugging on Chromium OS |
472 'linux_disable_pie%': 0, | 477 'linux_disable_pie%': 0, |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 # Enable a variable used elsewhere throughout the GYP files to determine | 629 # Enable a variable used elsewhere throughout the GYP files to determine |
625 # whether to compile in the sources for the GPU plugin / process. | 630 # whether to compile in the sources for the GPU plugin / process. |
626 'enable_gpu%': 1, | 631 'enable_gpu%': 1, |
627 | 632 |
628 # .gyp files or targets should set chromium_code to 1 if they build | 633 # .gyp files or targets should set chromium_code to 1 if they build |
629 # Chromium-specific code, as opposed to external code. This variable is | 634 # Chromium-specific code, as opposed to external code. This variable is |
630 # used to control such things as the set of warnings to enable, and | 635 # used to control such things as the set of warnings to enable, and |
631 # whether warnings are treated as errors. | 636 # whether warnings are treated as errors. |
632 'chromium_code%': 0, | 637 'chromium_code%': 0, |
633 | 638 |
| 639 'release_valgrind_build%': 0, |
| 640 |
634 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 | 641 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 |
635 'enable_wexit_time_destructors%': 0, | 642 'enable_wexit_time_destructors%': 0, |
636 | 643 |
637 # Set to 1 to compile with the built in pdf viewer. | 644 # Set to 1 to compile with the built in pdf viewer. |
638 'internal_pdf%': 0, | 645 'internal_pdf%': 0, |
639 | 646 |
640 # This allows to use libcros from the current system, ie. /usr/lib/ | 647 # This allows to use libcros from the current system, ie. /usr/lib/ |
641 # The cros_api will be pulled in as a static library, and all headers | 648 # The cros_api will be pulled in as a static library, and all headers |
642 # from the system include dirs. | 649 # from the system include dirs. |
643 'system_libcros%': 0, | 650 'system_libcros%': 0, |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
995 | 1002 |
996 # VS inserts quite a lot of extra checks to algorithms like | 1003 # VS inserts quite a lot of extra checks to algorithms like |
997 # std::partial_sort in Debug build which make them O(N^2) | 1004 # std::partial_sort in Debug build which make them O(N^2) |
998 # instead of O(N*logN). This is particularly slow under memory | 1005 # instead of O(N*logN). This is particularly slow under memory |
999 # tools like ThreadSanitizer so we want it to be disablable. | 1006 # tools like ThreadSanitizer so we want it to be disablable. |
1000 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx | 1007 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx |
1001 'win_debug_disable_iterator_debugging%': '0', | 1008 'win_debug_disable_iterator_debugging%': '0', |
1002 | 1009 |
1003 'release_extra_cflags%': '', | 1010 'release_extra_cflags%': '', |
1004 'debug_extra_cflags%': '', | 1011 'debug_extra_cflags%': '', |
1005 'release_valgrind_build%': 0, | 1012 |
| 1013 'release_valgrind_build%': '<(release_valgrind_build)', |
1006 | 1014 |
1007 # the non-qualified versions are widely assumed to be *nix-only | 1015 # the non-qualified versions are widely assumed to be *nix-only |
1008 'win_release_extra_cflags%': '', | 1016 'win_release_extra_cflags%': '', |
1009 'win_debug_extra_cflags%': '', | 1017 'win_debug_extra_cflags%': '', |
1010 | 1018 |
1011 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 | 1019 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 |
1012 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)', | 1020 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)', |
1013 | 1021 |
1014 # Only used by Windows build for now. Can be used to build into a | 1022 # Only used by Windows build for now. Can be used to build into a |
1015 # differet output directory, e.g., a build_dir_prefix of VS2010_ would | 1023 # differet output directory, e.g., a build_dir_prefix of VS2010_ would |
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1718 'cflags!': [ | 1726 'cflags!': [ |
1719 '-fno-ident', | 1727 '-fno-ident', |
1720 ], | 1728 ], |
1721 }], | 1729 }], |
1722 ['profiling==1', { | 1730 ['profiling==1', { |
1723 'cflags': [ | 1731 'cflags': [ |
1724 '-fno-omit-frame-pointer', | 1732 '-fno-omit-frame-pointer', |
1725 '-g', | 1733 '-g', |
1726 ], | 1734 ], |
1727 }], | 1735 }], |
1728 # At gyp time, we test the linker for ICF support; this flag | 1736 ], |
1729 # is then provided to us by gyp. (Currently only gold supports | |
1730 # an --icf flag.) | |
1731 # There seems to be a conflict of --icf and -pie in gold which | |
1732 # can generate crashy binaries. As a security measure, -pie | |
1733 # takes precendence for now. | |
1734 ['LINKER_SUPPORTS_ICF==1 and release_valgrind_build==0', { | |
1735 'target_conditions': [ | |
1736 ['_toolset=="target"', { | |
1737 'ldflags': [ | |
1738 #'-Wl,--icf=safe', | |
1739 '-Wl,--icf=none', | |
1740 ] | |
1741 }] | |
1742 ] | |
1743 }], | |
1744 ] | |
1745 }, | 1737 }, |
1746 }, | 1738 }, |
1747 'variants': { | 1739 'variants': { |
1748 'coverage': { | 1740 'coverage': { |
1749 'cflags': ['-fprofile-arcs', '-ftest-coverage'], | 1741 'cflags': ['-fprofile-arcs', '-ftest-coverage'], |
1750 'ldflags': ['-fprofile-arcs'], | 1742 'ldflags': ['-fprofile-arcs'], |
1751 }, | 1743 }, |
1752 'profile': { | 1744 'profile': { |
1753 'cflags': ['-pg', '-g'], | 1745 'cflags': ['-pg', '-g'], |
1754 'ldflags': ['-pg'], | 1746 'ldflags': ['-pg'], |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2000 'variables': {'linux_use_tcmalloc%': 1}, | 1992 'variables': {'linux_use_tcmalloc%': 1}, |
2001 'defines': ['USE_HEAPCHECKER'], | 1993 'defines': ['USE_HEAPCHECKER'], |
2002 }], | 1994 }], |
2003 ['linux_use_tcmalloc==0', { | 1995 ['linux_use_tcmalloc==0', { |
2004 'defines': ['NO_TCMALLOC'], | 1996 'defines': ['NO_TCMALLOC'], |
2005 }], | 1997 }], |
2006 ['linux_keep_shadow_stacks==1', { | 1998 ['linux_keep_shadow_stacks==1', { |
2007 'defines': ['KEEP_SHADOW_STACKS'], | 1999 'defines': ['KEEP_SHADOW_STACKS'], |
2008 'cflags': ['-finstrument-functions'], | 2000 'cflags': ['-finstrument-functions'], |
2009 }], | 2001 }], |
| 2002 ['linux_use_gold_flags==1', { |
| 2003 'conditions': [ |
| 2004 ['release_valgrind_build==0', { |
| 2005 'target_conditions': [ |
| 2006 ['_toolset=="target"', { |
| 2007 'ldflags': [ |
| 2008 # There seems to be a conflict of --icf and -pie |
| 2009 # in gold which can generate crashy binaries. As |
| 2010 # a security measure, -pie takes precendence for |
| 2011 # now. |
| 2012 #'-Wl,--icf=safe', |
| 2013 '-Wl,--icf=none', |
| 2014 ], |
| 2015 }], |
| 2016 ], |
| 2017 }], |
| 2018 ], |
| 2019 }], |
2010 ['linux_use_gold_binary==1', { | 2020 ['linux_use_gold_binary==1', { |
2011 'variables': { | 2021 'variables': { |
2012 # We pass the path to gold to the compiler. gyp leaves | 2022 # We pass the path to gold to the compiler. gyp leaves |
2013 # unspecified what the cwd is when running the compiler, | 2023 # unspecified what the cwd is when running the compiler, |
2014 # so the normal gyp path-munging fails us. This hack | 2024 # so the normal gyp path-munging fails us. This hack |
2015 # gets the right path. | 2025 # gets the right path. |
2016 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold', | 2026 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold', |
2017 }, | 2027 }, |
2018 'ldflags': [ | 2028 'ldflags': [ |
2019 # Put our gold binary in the search path for the linker. | 2029 # Put our gold binary in the search path for the linker. |
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2777 # settings in target dicts. SYMROOT is a special case, because many other | 2787 # settings in target dicts. SYMROOT is a special case, because many other |
2778 # Xcode variables depend on it, including variables such as | 2788 # Xcode variables depend on it, including variables such as |
2779 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 2789 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
2780 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 2790 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
2781 # files to appear (when present) in the UI as actual files and not red | 2791 # files to appear (when present) in the UI as actual files and not red |
2782 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 2792 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
2783 # and therefore SYMROOT, needs to be set at the project level. | 2793 # and therefore SYMROOT, needs to be set at the project level. |
2784 'SYMROOT': '<(DEPTH)/xcodebuild', | 2794 'SYMROOT': '<(DEPTH)/xcodebuild', |
2785 }, | 2795 }, |
2786 } | 2796 } |
OLD | NEW |