-
Notifications
You must be signed in to change notification settings - Fork 7
/
scalloc.gyp
100 lines (100 loc) · 2.53 KB
/
scalloc.gyp
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
{
'includes': [
'common.gypi',
],
'variables': {
'log_level%': "kWarning",
'reuse_threshold%': "80",
'lab_model%': "SCALLOC_LAB_MODEL_TLAB",
'madvise%': 'yes',
'madvise_eager%': 'yes',
'span_pool_backend_limit%': 'cpu',
'cleanup_in_free%': 'yes',
'safe_global_construction%': 'no',
'strict_memory%': 'no',
'disable_transparent_hugepages%': 'no' ,
},
'conditions': [
],
'targets': [
{
'target_name': 'scalloc',
'product_name': 'scalloc',
'type' : 'shared_library',
'defines': [
'SCALLOC_LOG_LEVEL=<(log_level)',
'SCALLOC_REUSE_THRESHOLD=<(reuse_threshold)',
'SCALLOC_LAB_MODEL=<(lab_model)',
],
'conditions': [
['OS=="linux"', {
'ldflags': [ '-pthread' ],
'libraries': ['-ldl'],
'cflags': [ '-mcx16' ],
'sources': [
'src/platform/pthread_intercept.cc'
]
}],
['"no"=="<(madvise)"', {
'defines': [
'SCALLOC_NO_MADVISE'
]
}],
['"no"=="<(madvise_eager)"', {
'defines': [
'SCALLOC_NO_MADVISE_EAGER'
]
}],
['"cpu"!="<(span_pool_backend_limit)"', {
'defines': [
'SCALLOC_SPAN_POOL_BACKEND_LIMIT=<(span_pool_backend_limit)'
]
}],
['"yes"!="<(cleanup_in_free)"', {
'defines': [
'SCALLOC_NO_CLEANUP_IN_FREE'
]
}],
['"no"=="<(safe_global_construction)"', {
'defines': [
'SCALLOC_NO_SAFE_GLOBAL_CONSTRUCTION'
]
}],
['"yes"=="<(strict_memory)"', {
'defines': [
'SCALLOC_STRICT_DUMP',
'SCALLOC_STRICT_PROTECT',
]
}],
['"yes"=="<(disable_transparent_hugepages)"', {
'defines': [
'SCALLOC_DISABLE_TRANSPARENT_HUGEPAGES',
]
}],
],
'sources': [
'src/arena.h',
'src/globals.h',
'src/core.h',
'src/lab.h',
'src/log.h',
'src/glue.h',
'src/glue.cc',
'src/platform/assert.h',
'src/platform/globals.h',
'src/platform/override.h',
'src/platform/override_gcc_weak.h',
'src/platform/override_osx.h',
'src/platform/pthread_intercept.h',
'src/platform/pthread_intercept.cc',
'src/size_classes.h',
'src/span.h',
'src/span_pool.h',
'src/utils.h'
],
'include_dirs': [
'src',
]
},
],
}