Skip to content

Commit

Permalink
Refactoring build configurations - make it clearer and allow better s…
Browse files Browse the repository at this point in the history
…upport for x64 on Windows

TEST=none
BUG=29467


Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=35012
Review URL: http://codereview.chromium.org/501127

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35129 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
gregoryd@google.com committed Dec 22, 2009
1 parent 2f93059 commit c58acae
Show file tree
Hide file tree
Showing 15 changed files with 110 additions and 70 deletions.
2 changes: 1 addition & 1 deletion DEPS
Expand Up @@ -42,7 +42,7 @@ deps = {
"http://v8.googlecode.com/svn/trunk@3510",

"src/native_client":
"http://nativeclient.googlecode.com/svn/trunk/src/native_client@1067",
"http://nativeclient.googlecode.com/svn/trunk/src/native_client@1175",

"src/third_party/skia/src":
"http://skia.googlecode.com/svn/trunk/src@" + Var("skia_revision"),
Expand Down
2 changes: 1 addition & 1 deletion app/app_base.gypi
Expand Up @@ -282,7 +282,7 @@
'../third_party/skia/include/core',
],
'configurations': {
'Common': {
'Common_Base': {
'msvs_target_platform': 'x64',
},
},
Expand Down
4 changes: 2 additions & 2 deletions base/allocator/allocator.gyp
Expand Up @@ -20,7 +20,7 @@
],
'direct_dependent_settings': {
'configurations': {
'Common': {
'Common_Base': {
'msvs_settings': {
'VCLinkerTool': {
'IgnoreDefaultLibraryNames': ['libcmtd.lib', 'libcmt.lib'],
Expand Down Expand Up @@ -261,7 +261,7 @@
},
},
'configurations': {
'Debug': {
'Debug_Base': {
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': '0',
Expand Down
4 changes: 2 additions & 2 deletions breakpad/breakpad.gyp
Expand Up @@ -14,7 +14,7 @@
'src',
],
'configurations': {
'Debug': {
'Debug_Base': {
'defines': [
# This is needed for GTMLogger to work correctly.
'DEBUG',
Expand Down Expand Up @@ -115,7 +115,7 @@
],
},
'configurations': {
'Release': {
'Release_Base': {
'xcode_settings': {
# dump_syms crashes when built at -O1, -O2, and -O3. It does
# not crash at -Os. To play it safe, dump_syms is always built
Expand Down
2 changes: 1 addition & 1 deletion breakpad/breakpad_handler.gypi
Expand Up @@ -73,7 +73,7 @@
],
},
'configurations': {
'Common': {
'Common_Base': {
'msvs_target_platform': 'x64',
},
},
Expand Down
2 changes: 1 addition & 1 deletion breakpad/breakpad_sender.gypi
Expand Up @@ -59,7 +59,7 @@
],
},
'configurations': {
'Common': {
'Common_Base': {
'msvs_target_platform': 'x64',
},
},
Expand Down
132 changes: 86 additions & 46 deletions build/common.gypi
Expand Up @@ -396,27 +396,62 @@
], # conditions for 'target_defaults'
'default_configuration': 'Debug',
'configurations': {
# VCLinkerTool LinkIncremental values below:
# 0 == default
# 1 == /INCREMENTAL:NO
# 2 == /INCREMENTAL
# Debug links incremental, Release does not.
'Common': {
# VCLinkerTool LinkIncremental values below:
# 0 == default
# 1 == /INCREMENTAL:NO
# 2 == /INCREMENTAL
# Debug links incremental, Release does not.
#
# Abstract base configurations to cover common
# attributes.
#
'Common_Base': {
'abstract': 1,
'msvs_configuration_attributes': {
'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
'CharacterSet': '1',
},
},
'x86_Base': {
'abstract': 1,
'msvs_settings': {
'VCLinkerTool': {
'TargetMachine': '1',
},
},
'msvs_configuration_platform': 'Win32',
},
'Debug': {
'inherit_from': ['Common'],
'x64_Base': {
'abstract': 1,
'msvs_configuration_platform': 'x64',
'msvs_settings': {
'VCLinkerTool': {
'TargetMachine': '17', # x86 - 64
},
},
'msvs_settings': {
'VCLibrarianTool': {
'AdditionalLibraryDirectories!':
['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
'AdditionalLibraryDirectories':
['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
},
'VCLinkerTool': {
'TargetMachine': '17',
'AdditionalLibraryDirectories!':
['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
'AdditionalLibraryDirectories':
['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
},
},
'defines': [
# Not sure if tcmalloc works on 64-bit Windows.
'NO_TCMALLOC',
],
},
'Debug_Base': {
'abstract': 1,
'xcode_settings': {
'COPY_PHASE_STRIP': 'NO',
'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
Expand Down Expand Up @@ -444,8 +479,8 @@
}],
],
},
'Release': {
'inherit_from': ['Common'],
'Release_Base': {
'abstract': 1,
'defines': [
'NDEBUG',
],
Expand Down Expand Up @@ -477,54 +512,59 @@
# class 'std::bad_cast'
'msvs_disabled_warnings': [4275],
}],
['msvs_use_common_release', {
'msvs_props': ['release.vsprops'],
}],
['OS=="linux"', {
'cflags': [
'<@(release_extra_cflags)',
],
}],
],
},
'Purify_Base': {
'abstract': 1,
'defines': [
'PURIFY',
'NO_TCMALLOC',
],
'msvs_settings': {
'VCCLCompilerTool': {
'Optimization': '0',
'RuntimeLibrary': '0',
'BufferSecurityCheck': 'false',
},
'VCLinkerTool': {
'EnableCOMDATFolding': '1',
'LinkIncremental': '1',
},
},
},
#
# Concrete configurations
#
'Debug': {
'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
},
'Release': {
'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
'conditions': [
['msvs_use_common_release', {
'msvs_props': ['release.vsprops'],
}],
]
},
'conditions': [
[ 'OS=="win"', {
# TODO(bradnelson): add a gyp mechanism to make this more graceful.
'Purify': {
'inherit_from': ['Release'],
'defines': [
'PURIFY',
'NO_TCMALLOC',
],
'msvs_settings': {
'VCCLCompilerTool': {
'Optimization': '0',
'RuntimeLibrary': '0',
'BufferSecurityCheck': 'false',
},
'VCLinkerTool': {
'EnableCOMDATFolding': '1',
'LinkIncremental': '1',
},
},
},
'Common_x64': {
'msvs_configuration_platform': 'x64',
'msvs_settings': {
'VCLinkerTool': {
'TargetMachine': '17',
},
},
'abstract': 1,
'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base', 'Purify'],
},
'Debug_x64': {
'inherit_from': ['Debug', 'Common_x64'],
'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
},
'Release_x64': {
'inherit_from': ['Release', 'Common_x64'],
'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
},
'Purify_x64': {
'inherit_from': ['Purify', 'Common_x64'],
'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base', 'Purify'],
},
}],
],
Expand Down Expand Up @@ -628,7 +668,7 @@
'OFFICIAL_BUILD',
],
'configurations': {
'Debug': {
'Debug_Base': {
'variables': {
'debug_optimize%': '0',
},
Expand All @@ -645,7 +685,7 @@
'-rdynamic', # Allows backtrace to resolve symbols.
],
},
'Release': {
'Release_Base': {
'variables': {
'release_optimize%': '2',
},
Expand Down Expand Up @@ -861,7 +901,7 @@
# strip_from_xcode will not be used, set Xcode to do the
# stripping as well.
'configurations': {
'Release': {
'Release_Base': {
'xcode_settings': {
'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
'DEPLOYMENT_POSTPROCESSING': 'YES',
Expand Down Expand Up @@ -1051,15 +1091,15 @@
},
},
'configurations': {
'Common': {
'x86_Base': {
'msvs_settings': {
'VCLinkerTool': {
'AdditionalOptions':
'/safeseh /dynamicbase /ignore:4199 /ignore:4221 /nxcompat',
},
},
},
'Common_x64': {
'x64_Base': {
'msvs_settings': {
'VCLinkerTool': {
'AdditionalOptions':
Expand Down
4 changes: 2 additions & 2 deletions chrome/chrome.gyp
Expand Up @@ -1766,7 +1766,7 @@
},
},
'configurations': {
'Debug': {
'Debug_Base': {
'msvs_settings': {
'VCLinkerTool': {
'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
Expand Down Expand Up @@ -2624,7 +2624,7 @@
}],
],
'configurations': {
'Debug': {
'Debug_Base': {
'msvs_settings': {
'VCLinkerTool': {
'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
Expand Down
14 changes: 7 additions & 7 deletions chrome/chrome_tests.gypi
Expand Up @@ -373,7 +373,7 @@
],
},
'configurations': {
'Debug': {
'Debug_Base': {
'msvs_settings': {
'VCLinkerTool': {
'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
Expand Down Expand Up @@ -456,7 +456,7 @@
],
},
'configurations': {
'Debug': {
'Debug_Base': {
'msvs_settings': {
'VCLinkerTool': {
'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
Expand Down Expand Up @@ -1001,7 +1001,7 @@
],
},
'configurations': {
'Debug': {
'Debug_Base': {
'msvs_settings': {
'VCLinkerTool': {
'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
Expand Down Expand Up @@ -1136,7 +1136,7 @@
'<(allocator_target)',
],
'configurations': {
'Debug': {
'Debug_Base': {
'msvs_settings': {
'VCLinkerTool': {
'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
Expand Down Expand Up @@ -1485,7 +1485,7 @@
],
},
'configurations': {
'Debug': {
'Debug_Base': {
'msvs_settings': {
'VCLinkerTool': {
'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
Expand Down Expand Up @@ -1555,7 +1555,7 @@
}],
['OS=="win"', {
'configurations': {
'Debug': {
'Debug_Base': {
'msvs_settings': {
'VCLinkerTool': {
'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
Expand Down Expand Up @@ -1666,7 +1666,7 @@
'<(allocator_target)',
],
'configurations': {
'Debug': {
'Debug_Base': {
'msvs_settings': {
'VCLinkerTool': {
'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
Expand Down
2 changes: 1 addition & 1 deletion chrome/installer/installer_util.gypi
Expand Up @@ -112,7 +112,7 @@
'<(SHARED_INTERMEDIATE_DIR)',
],
'configurations': {
'Common': {
'Common_Base': {
'msvs_target_platform': 'x64',
},
},
Expand Down
2 changes: 1 addition & 1 deletion chrome/installer/mini_installer.gyp
Expand Up @@ -60,7 +60,7 @@
},
},
'configurations': {
'Debug': {
'Debug_Base': {
'msvs_settings': {
'VCCLCompilerTool': {
'BasicRuntimeChecks': '0',
Expand Down
2 changes: 1 addition & 1 deletion chrome/test/interactive_ui/interactive_ui_tests.gypi
Expand Up @@ -135,7 +135,7 @@
}],
],
'configurations': {
'Debug': {
'Debug_Base': {
'msvs_settings': {
'VCLinkerTool': {
'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
Expand Down

0 comments on commit c58acae

Please sign in to comment.