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

Side by Side Diff: build/common.gypi

Issue 9194003: Revert 117533 - Fix ASLR Windows build configuration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 11 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 947 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html 958 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
959 'mac_release_optimization%': '3', # Use -O3 unless overridden 959 'mac_release_optimization%': '3', # Use -O3 unless overridden
960 'mac_debug_optimization%': '0', # Use -O0 unless overridden 960 'mac_debug_optimization%': '0', # Use -O0 unless overridden
961 961
962 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx 962 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
963 'win_release_Optimization%': '2', # 2 = /Os 963 'win_release_Optimization%': '2', # 2 = /Os
964 'win_debug_Optimization%': '0', # 0 = /Od 964 'win_debug_Optimization%': '0', # 0 = /Od
965 965
966 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx 966 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
967 # Tri-state: blank is default, 1 on, 0 off 967 # Tri-state: blank is default, 1 on, 0 off
968 'win_release_OmitFramePointers%': 1, 968 'win_release_OmitFramePointers%': '1',
969 # Tri-state: blank is default, 1 on, 0 off 969 # Tri-state: blank is default, 1 on, 0 off
970 'win_debug_OmitFramePointers%': '', 970 'win_debug_OmitFramePointers%': '',
971 971
972 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx 972 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
973 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off 973 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
974 974
975 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx 975 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
976 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off, 976 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
977 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max 977 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
978 978
979 # VS inserts quite a lot of extra checks to algorithms like 979 # VS inserts quite a lot of extra checks to algorithms like
980 # std::partial_sort in Debug build which make them O(N^2) 980 # std::partial_sort in Debug build which make them O(N^2)
981 # instead of O(N*logN). This is particularly slow under memory 981 # instead of O(N*logN). This is particularly slow under memory
982 # tools like ThreadSanitizer so we want it to be disablable. 982 # tools like ThreadSanitizer so we want it to be disablable.
983 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx 983 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
984 'win_debug_disable_iterator_debugging%': '0', 984 'win_debug_disable_iterator_debugging%': '0',
985 985
986 # Tri-state: blank is VS default, 1 on, 0 off
987 'win_release_RandomizedBaseAddress%': '',
988 # Tri-state: blank is VS default, 1 on, 0 off. Off by default: see below.
989 'win_debug_RandomizedBaseAddress%': 0,
990
991 'release_extra_cflags%': '', 986 'release_extra_cflags%': '',
992 'debug_extra_cflags%': '', 987 'debug_extra_cflags%': '',
993 'release_valgrind_build%': 0, 988 'release_valgrind_build%': 0,
994 989
995 # the non-qualified versions are widely assumed to be *nix-only 990 # the non-qualified versions are widely assumed to be *nix-only
996 'win_release_extra_cflags%': '', 991 'win_release_extra_cflags%': '',
997 'win_debug_extra_cflags%': '', 992 'win_debug_extra_cflags%': '',
998 993
999 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 994 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1000 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)', 995 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
1515 # perform FPO regardless, so we must explicitly disable. 1510 # perform FPO regardless, so we must explicitly disable.
1516 # We still want the false setting above to avoid having 1511 # We still want the false setting above to avoid having
1517 # "/Oy /Oy-" and warnings about overriding. 1512 # "/Oy /Oy-" and warnings about overriding.
1518 'AdditionalOptions': ['/Oy-'], 1513 'AdditionalOptions': ['/Oy-'],
1519 }], 1514 }],
1520 ], 1515 ],
1521 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ], 1516 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
1522 }, 1517 },
1523 'VCLinkerTool': { 1518 'VCLinkerTool': {
1524 'LinkIncremental': '<(msvs_debug_link_incremental)', 1519 'LinkIncremental': '<(msvs_debug_link_incremental)',
1525 'conditions': [ 1520 # ASLR makes debugging with windbg difficult because Chrome.exe and
1526 # ASLR makes debugging with windbg difficult because Chrome.exe 1521 # Chrome.dll share the same base name. As result, windbg will
1527 # and Chrome.dll share the same base name. As result, windbg will 1522 # name the Chrome.dll module like chrome_<base address>, where
1528 # name the Chrome.dll module like chrome_<base address>, where 1523 # <base address> typically changes with each launch. This in turn
1529 # <base address> typically changes with each launch. This in turn 1524 # means that breakpoints in Chrome.dll don't stick from one launch
1530 # means that breakpoints in Chrome.dll don't stick from one launch 1525 # to the next. For this reason, we turn ASLR off in debug builds.
1531 # to the next. For this reason, we turn ASLR off in debug builds. 1526 # Note that this is a three-way bool, where 0 means to pick up
1532 # Note that this is a three-way bool, where 0 means to pick up 1527 # the default setting, 1 is off and 2 is on.
1533 # the default setting, 1 is off and 2 is on. 1528 'RandomizedBaseAddress': 1,
1534 # Also note that an explicit /dynamicbase linker flag will
1535 # override this setting.
1536
1537 # If win_debug_RandomizedBaseAddress is blank, leave as default
1538 # (that's VS default: off for VS2008, on for VS2010).
1539 ['win_debug_RandomizedBaseAddress==1', {
1540 # No ASLR for executables or static libraries
1541 'target_conditions': [
1542 ['_type=="shared_library" or _type=="loadable_module"', {
1543 'RandomizedBaseAddress': 2,
1544 }],
1545 ],
1546 }],
1547 ['win_debug_RandomizedBaseAddress==0', {
1548 'RandomizedBaseAddress': 1,
1549 }],
1550 ],
1551 }, 1529 },
1552 'VCResourceCompilerTool': { 1530 'VCResourceCompilerTool': {
1553 'PreprocessorDefinitions': ['_DEBUG'], 1531 'PreprocessorDefinitions': ['_DEBUG'],
1554 }, 1532 },
1555 }, 1533 },
1556 'conditions': [ 1534 'conditions': [
1557 ['OS=="linux"', { 1535 ['OS=="linux"', {
1558 'cflags': [ 1536 'cflags': [
1559 '<@(debug_extra_cflags)', 1537 '<@(debug_extra_cflags)',
1560 ], 1538 ],
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1619 # LinkIncremental is a tri-state boolean, where 0 means default 1597 # LinkIncremental is a tri-state boolean, where 0 means default
1620 # (i.e., inherit from parent solution), 1 means false, and 1598 # (i.e., inherit from parent solution), 1 means false, and
1621 # 2 means true. 1599 # 2 means true.
1622 'LinkIncremental': '1', 1600 'LinkIncremental': '1',
1623 # This corresponds to the /PROFILE flag which ensures the PDB 1601 # This corresponds to the /PROFILE flag which ensures the PDB
1624 # file contains FIXUP information (growing the PDB file by about 1602 # file contains FIXUP information (growing the PDB file by about
1625 # 5%) but does not otherwise alter the output binary. This 1603 # 5%) but does not otherwise alter the output binary. This
1626 # information is used by the Syzygy optimization tool when 1604 # information is used by the Syzygy optimization tool when
1627 # decomposing the release image. 1605 # decomposing the release image.
1628 'Profile': 'true', 1606 'Profile': 'true',
1629 'conditions': [
1630 # If win_release_RandomizedBaseAddress is blank, leave as default.
1631 # For RandomizedBaseAddress: 0=default, 1=off, 2=on
1632 ['win_release_RandomizedBaseAddress==1', {
1633 # No ASLR for executables or static libraries
1634 'target_conditions': [
1635 ['_type=="shared_library" or _type=="loadable_module"', {
1636 'RandomizedBaseAddress': 2,
1637 }],
1638 ],
1639 }],
1640 ['win_release_RandomizedBaseAddress==0', {
1641 'RandomizedBaseAddress': 1,
1642 }],
1643 ],
1644 }, 1607 },
1645 }, 1608 },
1646 'conditions': [ 1609 'conditions': [
1647 ['release_valgrind_build==0', { 1610 ['release_valgrind_build==0', {
1648 'defines': [ 1611 'defines': [
1649 'NVALGRIND', 1612 'NVALGRIND',
1650 'DYNAMIC_ANNOTATIONS_ENABLED=0', 1613 'DYNAMIC_ANNOTATIONS_ENABLED=0',
1651 ], 1614 ],
1652 }, { 1615 }, {
1653 'defines': [ 1616 'defines': [
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
2775 'uxtheme.dll', 2738 'uxtheme.dll',
2776 ], 2739 ],
2777 }, 2740 },
2778 }, 2741 },
2779 'configurations': { 2742 'configurations': {
2780 'x86_Base': { 2743 'x86_Base': {
2781 'msvs_settings': { 2744 'msvs_settings': {
2782 'VCLinkerTool': { 2745 'VCLinkerTool': {
2783 'AdditionalOptions': [ 2746 'AdditionalOptions': [
2784 '/safeseh', 2747 '/safeseh',
2748 '/dynamicbase',
2785 '/ignore:4199', 2749 '/ignore:4199',
2786 '/ignore:4221', 2750 '/ignore:4221',
2787 '/nxcompat', 2751 '/nxcompat',
2788 ], 2752 ],
2789 }, 2753 },
2790 }, 2754 },
2791 }, 2755 },
2792 'x64_Base': { 2756 'x64_Base': {
2793 'msvs_settings': { 2757 'msvs_settings': {
2794 'VCLinkerTool': { 2758 'VCLinkerTool': {
2795 'AdditionalOptions': [ 2759 'AdditionalOptions': [
2796 # safeseh is not compatible with x64 2760 # safeseh is not compatible with x64
2761 '/dynamicbase',
2797 '/ignore:4199', 2762 '/ignore:4199',
2798 '/ignore:4221', 2763 '/ignore:4221',
2799 '/nxcompat', 2764 '/nxcompat',
2800 ], 2765 ],
2801 }, 2766 },
2802 }, 2767 },
2803 }, 2768 },
2804 }, 2769 },
2805 }, 2770 },
2806 }], 2771 }],
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
2841 # settings in target dicts. SYMROOT is a special case, because many other 2806 # settings in target dicts. SYMROOT is a special case, because many other
2842 # Xcode variables depend on it, including variables such as 2807 # Xcode variables depend on it, including variables such as
2843 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 2808 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
2844 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 2809 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
2845 # files to appear (when present) in the UI as actual files and not red 2810 # files to appear (when present) in the UI as actual files and not red
2846 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 2811 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
2847 # and therefore SYMROOT, needs to be set at the project level. 2812 # and therefore SYMROOT, needs to be set at the project level.
2848 'SYMROOT': '<(DEPTH)/xcodebuild', 2813 'SYMROOT': '<(DEPTH)/xcodebuild',
2849 }, 2814 },
2850 } 2815 }
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