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

Side by Side Diff: build/common.gypi

Issue 9169020: Fix ASLR Windows build configuration (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
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 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
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%': '1',
Sigurður Ásgeirsson 2012/01/10 20:18:34 You set this to a stringified-one '1' here, but th
Derek Bruening 2012/01/10 20:48:53 Right, I will change this to numeric.
M-A Ruel 2012/01/10 21:02:00 I must say I'm unhappy about that, that's why I fi
988 # Tri-state: blank is VS default, 1 on, 0 off. Off by default: see below.
989 'win_debug_RandomizedBaseAddress%': '0',
990
986 'release_extra_cflags%': '', 991 'release_extra_cflags%': '',
987 'debug_extra_cflags%': '', 992 'debug_extra_cflags%': '',
988 'release_valgrind_build%': 0, 993 'release_valgrind_build%': 0,
989 994
990 # the non-qualified versions are widely assumed to be *nix-only 995 # the non-qualified versions are widely assumed to be *nix-only
991 'win_release_extra_cflags%': '', 996 'win_release_extra_cflags%': '',
992 'win_debug_extra_cflags%': '', 997 'win_debug_extra_cflags%': '',
993 998
994 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 999 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
995 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)', 1000 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
1510 # perform FPO regardless, so we must explicitly disable. 1515 # perform FPO regardless, so we must explicitly disable.
1511 # We still want the false setting above to avoid having 1516 # We still want the false setting above to avoid having
1512 # "/Oy /Oy-" and warnings about overriding. 1517 # "/Oy /Oy-" and warnings about overriding.
1513 'AdditionalOptions': ['/Oy-'], 1518 'AdditionalOptions': ['/Oy-'],
1514 }], 1519 }],
1515 ], 1520 ],
1516 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ], 1521 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
1517 }, 1522 },
1518 'VCLinkerTool': { 1523 'VCLinkerTool': {
1519 'LinkIncremental': '<(msvs_debug_link_incremental)', 1524 'LinkIncremental': '<(msvs_debug_link_incremental)',
1520 # ASLR makes debugging with windbg difficult because Chrome.exe and 1525 'conditions': [
1521 # Chrome.dll share the same base name. As result, windbg will 1526 # ASLR makes debugging with windbg difficult because Chrome.exe
1522 # name the Chrome.dll module like chrome_<base address>, where 1527 # and Chrome.dll share the same base name. As result, windbg will
1523 # <base address> typically changes with each launch. This in turn 1528 # name the Chrome.dll module like chrome_<base address>, where
1524 # means that breakpoints in Chrome.dll don't stick from one launch 1529 # <base address> typically changes with each launch. This in turn
1525 # to the next. For this reason, we turn ASLR off in debug builds. 1530 # means that breakpoints in Chrome.dll don't stick from one launch
1526 # Note that this is a three-way bool, where 0 means to pick up 1531 # to the next. For this reason, we turn ASLR off in debug builds.
1527 # the default setting, 1 is off and 2 is on. 1532 # Note that this is a three-way bool, where 0 means to pick up
1528 'RandomizedBaseAddress': 1, 1533 # the default setting, 1 is off and 2 is on.
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', {
Sigurður Ásgeirsson 2012/01/10 20:18:34 did you intend 'win_debug_RandomizedBaseAddress=="
Derek Bruening 2012/01/10 20:48:53 Above should be numeric.
1540 'RandomizedBaseAddress': 2,
1541 }],
1542 ['win_debug_RandomizedBaseAddress==0', {
1543 'RandomizedBaseAddress': 1,
1544 }],
1545 ],
1529 }, 1546 },
1530 'VCResourceCompilerTool': { 1547 'VCResourceCompilerTool': {
1531 'PreprocessorDefinitions': ['_DEBUG'], 1548 'PreprocessorDefinitions': ['_DEBUG'],
1532 }, 1549 },
1533 }, 1550 },
1534 'conditions': [ 1551 'conditions': [
1535 ['OS=="linux"', { 1552 ['OS=="linux"', {
1536 'cflags': [ 1553 'cflags': [
1537 '<@(debug_extra_cflags)', 1554 '<@(debug_extra_cflags)',
1538 ], 1555 ],
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1597 # LinkIncremental is a tri-state boolean, where 0 means default 1614 # LinkIncremental is a tri-state boolean, where 0 means default
1598 # (i.e., inherit from parent solution), 1 means false, and 1615 # (i.e., inherit from parent solution), 1 means false, and
1599 # 2 means true. 1616 # 2 means true.
1600 'LinkIncremental': '1', 1617 'LinkIncremental': '1',
1601 # This corresponds to the /PROFILE flag which ensures the PDB 1618 # This corresponds to the /PROFILE flag which ensures the PDB
1602 # file contains FIXUP information (growing the PDB file by about 1619 # file contains FIXUP information (growing the PDB file by about
1603 # 5%) but does not otherwise alter the output binary. This 1620 # 5%) but does not otherwise alter the output binary. This
1604 # information is used by the Syzygy optimization tool when 1621 # information is used by the Syzygy optimization tool when
1605 # decomposing the release image. 1622 # decomposing the release image.
1606 'Profile': 'true', 1623 'Profile': 'true',
1624 'conditions': [
1625 # If win_release_RandomizedBaseAddress is blank, leave as default.
1626 # For RandomizedBaseAddress: 0=default, 1=off, 2=on
1627 ['win_release_RandomizedBaseAddress==1', {
1628 'RandomizedBaseAddress': 2,
1629 }],
1630 ['win_release_RandomizedBaseAddress==0', {
1631 'RandomizedBaseAddress': 1,
1632 }],
1633 ],
1607 }, 1634 },
1608 }, 1635 },
1609 'conditions': [ 1636 'conditions': [
1610 ['release_valgrind_build==0', { 1637 ['release_valgrind_build==0', {
1611 'defines': [ 1638 'defines': [
1612 'NVALGRIND', 1639 'NVALGRIND',
1613 'DYNAMIC_ANNOTATIONS_ENABLED=0', 1640 'DYNAMIC_ANNOTATIONS_ENABLED=0',
1614 ], 1641 ],
1615 }, { 1642 }, {
1616 'defines': [ 1643 'defines': [
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
2738 'uxtheme.dll', 2765 'uxtheme.dll',
2739 ], 2766 ],
2740 }, 2767 },
2741 }, 2768 },
2742 'configurations': { 2769 'configurations': {
2743 'x86_Base': { 2770 'x86_Base': {
2744 'msvs_settings': { 2771 'msvs_settings': {
2745 'VCLinkerTool': { 2772 'VCLinkerTool': {
2746 'AdditionalOptions': [ 2773 'AdditionalOptions': [
2747 '/safeseh', 2774 '/safeseh',
2748 '/dynamicbase',
2749 '/ignore:4199', 2775 '/ignore:4199',
2750 '/ignore:4221', 2776 '/ignore:4221',
2751 '/nxcompat', 2777 '/nxcompat',
2752 ], 2778 ],
2753 }, 2779 },
2754 }, 2780 },
2755 }, 2781 },
2756 'x64_Base': { 2782 'x64_Base': {
2757 'msvs_settings': { 2783 'msvs_settings': {
2758 'VCLinkerTool': { 2784 'VCLinkerTool': {
2759 'AdditionalOptions': [ 2785 'AdditionalOptions': [
2760 # safeseh is not compatible with x64 2786 # safeseh is not compatible with x64
2761 '/dynamicbase',
2762 '/ignore:4199', 2787 '/ignore:4199',
2763 '/ignore:4221', 2788 '/ignore:4221',
2764 '/nxcompat', 2789 '/nxcompat',
2765 ], 2790 ],
2766 }, 2791 },
2767 }, 2792 },
2768 }, 2793 },
2769 }, 2794 },
2770 }, 2795 },
2771 }], 2796 }],
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
2806 # settings in target dicts. SYMROOT is a special case, because many other 2831 # settings in target dicts. SYMROOT is a special case, because many other
2807 # Xcode variables depend on it, including variables such as 2832 # Xcode variables depend on it, including variables such as
2808 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 2833 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
2809 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 2834 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
2810 # files to appear (when present) in the UI as actual files and not red 2835 # files to appear (when present) in the UI as actual files and not red
2811 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 2836 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
2812 # and therefore SYMROOT, needs to be set at the project level. 2837 # and therefore SYMROOT, needs to be set at the project level.
2813 'SYMROOT': '<(DEPTH)/xcodebuild', 2838 'SYMROOT': '<(DEPTH)/xcodebuild',
2814 }, 2839 },
2815 } 2840 }
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