summaryrefslogtreecommitdiffstats
path: root/third_party/tcmalloc/tcmalloc.gyp
blob: ddef91f1b2976411f9dd9d97bf6684e66c34644b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

{
  'includes': [
    '../../build/common.gypi',
  ],
  'targets': [
    {
      'target_name': 'tcmalloc',
      'type': '<(library)',
      'msvs_guid': 'C564F145-9172-42C3-BFCB-60FDEA124321',
      'dependencies': [
        'libcmt',
      ],
      'include_dirs': [
        '.',
        'tcmalloc/src/windows',
        'tcmalloc/src/base',
        'tcmalloc/src',
      ],
      'direct_dependent_settings': {
        'msvs_settings': {
          'VCLinkerTool': {
            'IgnoreDefaultLibraryNames': ['libcmtd.lib', 'libcmt.lib'],
            'AdditionalDependencies': [
              '<(SHARED_INTERMEDIATE_DIR)/tcmalloc/libcmt.lib'
            ],
          },
        },
      },
      'sources': [
        'tcmalloc/src/base/dynamic_annotations.cc',
        'tcmalloc/src/base/logging.cc',
        'tcmalloc/src/base/low_level_alloc.cc',
        'tcmalloc/src/base/spinlock.cc',
        'tcmalloc/src/base/sysinfo.cc',
        'tcmalloc/src/central_freelist.cc',
        'tcmalloc/src/common.cc',
        'tcmalloc/src/heap-profile-table.cc',
        'tcmalloc/src/internal_logging.cc',
        'tcmalloc/src/malloc_extension.cc',
        'tcmalloc/src/malloc_hook.cc',
        'tcmalloc/src/page_heap.cc',
        'tcmalloc/src/sampler.cc',
        'tcmalloc/src/span.cc',
        'tcmalloc/src/stack_trace_table.cc',
        'tcmalloc/src/stacktrace.cc',
        'tcmalloc/src/static_vars.cc',
        'tcmalloc/src/thread_cache.cc',
        'tcmalloc/src/windows/override_functions.cc',
        'tcmalloc/src/windows/port.cc',
      ],
      'msvs_settings': {
        # TODO(sgk):  merge this with build/common.gypi settings
        'VCLibrarianTool=': {
          'AdditionalOptions': '/ignore:4006,4221',
          'AdditionalLibraryDirectories':
            ['<(DEPTH)/third_party/platformsdk_win2008_6_1/files/Lib'],
        },
        'VCLinkerTool': {
          'AdditionalOptions': '/ignore:4006',
        },
      },
      'configurations': {
        'Debug': {
          'msvs_settings': {
            'VCCLCompilerTool': {
              'RuntimeLibrary': '0',
            },
          },
        },
      },
    },
    {
      'target_name': 'libcmt',
      'conditions': [
        ['OS=="win"', {
          'type': 'utility',
        },{
          'type': 'none',
        }],
      ],
      'actions': [
        {
          'action_name': 'libcmt',
          'inputs': [
            'prep_libc.sh',
          ],
          'outputs': [
            '<(SHARED_INTERMEDIATE_DIR)/tcmalloc/libcmt.lib',
          ],
          'action': [
            './prep_libc.sh',
            '$(VCInstallDir)lib',
            '<(SHARED_INTERMEDIATE_DIR)/tcmalloc',
          ],
        },
      ],
    },
  ],
}