summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/common.gypi122
-rwxr-xr-xchrome/installer/mini_installer.gyp26
-rw-r--r--third_party/tcmalloc/tcmalloc.gyp16
3 files changed, 47 insertions, 117 deletions
diff --git a/build/common.gypi b/build/common.gypi
index 37dcdce..c571277 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -350,43 +350,50 @@
# 1 == /INCREMENTAL:NO
# 2 == /INCREMENTAL
# Debug links incremental, Release does not.
+ 'Common': {
+ 'abstract': 1,
+ 'msvs_configuration_attributes': {
+ 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
+ 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
+ 'CharacterSet': '1',
+ },
+ 'conditions': [
+ ['OS=="win"', {
+ 'configuration_platform': 'Win32',
+ }],
+ ],
+ },
'Debug': {
+ 'inherit_from': ['Common'],
'xcode_settings': {
'COPY_PHASE_STRIP': 'NO',
'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
'OTHER_CFLAGS': [ '<@(debug_extra_cflags)', ],
},
+ 'msvs_settings': {
+ 'VCCLCompilerTool': {
+ 'Optimization': '0',
+ 'PreprocessorDefinitions': ['_DEBUG'],
+ 'BasicRuntimeChecks': '3',
+ 'RuntimeLibrary': '1',
+ },
+ 'VCLinkerTool': {
+ 'LinkIncremental': '<(msvs_debug_link_incremental)',
+ },
+ 'VCResourceCompilerTool': {
+ 'PreprocessorDefinitions': ['_DEBUG'],
+ },
+ },
'conditions': [
- [ 'OS=="win"', {
- 'configuration_platform': 'Win32',
- 'msvs_configuration_attributes': {
- 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
- 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
- 'CharacterSet': '1',
- },
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'Optimization': '0',
- 'PreprocessorDefinitions': ['_DEBUG'],
- 'BasicRuntimeChecks': '3',
- 'RuntimeLibrary': '1',
- },
- 'VCLinkerTool': {
- 'LinkIncremental': '<(msvs_debug_link_incremental)',
- },
- 'VCResourceCompilerTool': {
- 'PreprocessorDefinitions': ['_DEBUG'],
- },
- },
+ ['OS=="linux"', {
+ 'cflags': [
+ '<@(debug_extra_cflags)',
+ ],
}],
- ['OS=="linux"', {
- 'cflags': [
- '<@(debug_extra_cflags)',
- ],
- }],
],
},
'Release': {
+ 'inherit_from': ['Common'],
'defines': [
'NDEBUG',
],
@@ -395,48 +402,34 @@
'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
},
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'LinkIncremental': '1',
+ },
+ },
'conditions': [
['release_valgrind_build==0', {
'defines': ['NVALGRIND'],
}],
- [ 'OS=="win" and msvs_use_common_release', {
+ ['msvs_use_common_release', {
'msvs_props': ['release.vsprops'],
}],
- [ 'OS=="win"', {
- 'configuration_platform': 'Win32',
- 'msvs_configuration_attributes': {
- 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
- 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
- 'CharacterSet': '1',
- },
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'LinkIncremental': '1',
- },
- },
- }],
- ['OS=="linux"', {
- 'cflags': [
+ ['OS=="linux"', {
+ 'cflags': [
'<@(release_extra_cflags)',
- ],
- }],
+ ],
+ }],
],
},
'conditions': [
[ 'OS=="win"', {
# TODO(bradnelson): add a gyp mechanism to make this more graceful.
'Purify': {
- 'configuration_platform': 'Win32',
+ 'inherit_from': ['Release'],
'defines': [
- 'NDEBUG',
'PURIFY',
'NO_TCMALLOC',
],
- 'msvs_configuration_attributes': {
- 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
- 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
- 'CharacterSet': '1',
- },
'msvs_settings': {
'VCCLCompilerTool': {
'Optimization': '0',
@@ -448,33 +441,10 @@
'LinkIncremental': '1',
},
},
- 'conditions': [
- [ 'msvs_use_common_release', {
- 'msvs_props': ['release.vsprops'],
- }],
- ],
},
'Release - no tcmalloc': {
- 'configuration_platform': 'Win32',
- 'defines': [
- 'NDEBUG',
- 'NO_TCMALLOC',
- ],
- 'msvs_configuration_attributes': {
- 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
- 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
- 'CharacterSet': '1',
- },
- 'conditions': [
- [ 'msvs_use_common_release', {
- 'msvs_props': ['release.vsprops'],
- }],
- ],
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'LinkIncremental': '1',
- },
- },
+ 'inherit_from': ['Release'],
+ 'defines': ['NO_TCMALLOC'],
},
}],
],
diff --git a/chrome/installer/mini_installer.gyp b/chrome/installer/mini_installer.gyp
index c1cfa0c..698884d 100755
--- a/chrome/installer/mini_installer.gyp
+++ b/chrome/installer/mini_installer.gyp
@@ -87,32 +87,6 @@
},
},
},
- 'conditions': [
- ['OS=="win"', {
- # TODO(bradnelson): add a gyp mechanism to make this more
- # graceful.
- 'Purify': {
- 'msvs_props': [
- 'mini_installer/mini_installer_release.vsprops'
- ],
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'BasicRuntimeChecks': '0',
- },
- },
- },
- 'Release - no tcmalloc': {
- 'msvs_props': [
- 'mini_installer/mini_installer_release.vsprops'
- ],
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'BasicRuntimeChecks': '0',
- },
- },
- },
- }],
- ],
},
'rules': [
{
diff --git a/third_party/tcmalloc/tcmalloc.gyp b/third_party/tcmalloc/tcmalloc.gyp
index 0e6a934..fbb2750 100644
--- a/third_party/tcmalloc/tcmalloc.gyp
+++ b/third_party/tcmalloc/tcmalloc.gyp
@@ -16,21 +16,7 @@
],
'direct_dependent_settings': {
'configurations': {
- # TODO(bradnelson): find a way to make this more graceful in gyp.
- # Ideally configurations should be able to have some sort of
- # inheritance hierarchy. So that Purify no-tcmalloc could be
- # be derived from Release.
- 'Debug': {
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'IgnoreDefaultLibraryNames': ['libcmtd.lib', 'libcmt.lib'],
- 'AdditionalDependencies': [
- '<(SHARED_INTERMEDIATE_DIR)/tcmalloc/libcmt.lib'
- ],
- },
- },
- },
- 'Release': {
+ 'Common': {
'msvs_settings': {
'VCLinkerTool': {
'IgnoreDefaultLibraryNames': ['libcmtd.lib', 'libcmt.lib'],