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

Unified Diff: base/allocator/allocator.gyp

Issue 1605023004: Reland of: Allow base to depend on allocator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: This CL: fix gyp issues Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/allocator/BUILD.gn ('k') | base/base.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/allocator/allocator.gyp
diff --git a/base/allocator/allocator.gyp b/base/allocator/allocator.gyp
index 45a95bbdc2669a0dafdd9fa9caaf0f050d7b921b..69ba35d5fad74d9cda37f88154c315a409809371 100644
--- a/base/allocator/allocator.gyp
+++ b/base/allocator/allocator.gyp
@@ -27,10 +27,17 @@
# knows what allocator makes sense.
{
'target_name': 'allocator',
- # TODO(primiano): This should be type: none for the noop cases (an empty
- # static lib can confuse some gyp generators). Fix it once the refactoring
- # (crbug.com/564618) bring this file to a saner state (fewer conditions).
- 'type': 'static_library',
+ 'variables': {
+ 'conditions': [
+ ['use_allocator!="none" or win_use_allocator_shim==1', {
+ 'allocator_target_type%': 'static_library',
+ }, {
+ 'allocator_target_type%': 'none',
+ }],
+ ],
+ },
+ 'type': '<(allocator_target_type)',
Nico 2016/01/20 17:37:00 (if you want, you don't need a variable for this,
Primiano Tucci (use gerrit) 2016/01/20 17:42:33 Hmm that was my first attempt but I got there a :
+ 'toolsets': ['host', 'target'],
Nico 2016/01/20 17:37:00 I think this will be fine since the xcode generato
'conditions': [
['OS=="win" and win_use_allocator_shim==1', {
'msvs_settings': {
@@ -51,6 +58,16 @@
'sources': [
'allocator_shim_win.cc',
],
+ 'link_settings': {
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'IgnoreDefaultLibraryNames': ['libcmtd.lib', 'libcmt.lib'],
+ 'AdditionalDependencies': [
+ '<(SHARED_INTERMEDIATE_DIR)/allocator/libcmt.lib'
+ ],
+ },
+ },
+ },
'configurations': {
'Debug_Base': {
'msvs_settings': {
@@ -60,20 +77,6 @@
},
},
},
- 'direct_dependent_settings': {
- 'configurations': {
- 'Common_Base': {
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'IgnoreDefaultLibraryNames': ['libcmtd.lib', 'libcmt.lib'],
- 'AdditionalDependencies': [
- '<(SHARED_INTERMEDIATE_DIR)/allocator/libcmt.lib'
- ],
- },
- },
- },
- },
- },
}], # OS=="win"
['use_allocator=="tcmalloc"', {
# Disable the heap checker in tcmalloc.
@@ -372,7 +375,7 @@
}, # 'allocator' target.
], # targets.
'conditions': [
- ['OS=="win" and component!="shared_library"', {
+ ['OS=="win" and win_use_allocator_shim==1', {
'targets': [
{
'target_name': 'libcmt',
« no previous file with comments | « base/allocator/BUILD.gn ('k') | base/base.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698