-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathcommon.gypi
executable file
·74 lines (74 loc) · 1.96 KB
/
common.gypi
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
{
'variables': {
'target_arch%': 'x64', # configure with --dest-cpu
'target_os%': 'none', # configure with --tizen
'revision%': 'N/A', # configure if available
'build_host%': '<(OS)',
'asan%': '0',
},
'target_defaults': {
'defines': [ 'LWNODE=1' ],
'cflags!': [ '-Wno-error' ],
'cflags': [
'-Wall', '-Wextra', '-Werror',
'-Wno-unused-variable',
'-Wno-unused-function',
'-Wno-unused-but-set-variable',
'-fPIC',
'-ggdb', # all builds include debug symbols, which will be stripped before packaging
'-fdata-sections', # for gc-sections
'-ffunction-sections', # for gc-sections
],
'ldflags': [
'-Wl,--gc-sections',
],
'link_settings': {
'libraries': [ '-ldl', '-lrt' ],
},
'configurations': {
'Debug': {
'cflags': [ '-O0' ],
},
'Release': {
'defines': ['NDEBUG'],
'cflags': [ '-Wfatal-errors', '-Os' ],
},
},
'all_dependent_settings': {
'configurations': {
'Release': {
'defines': ['NDEBUG'],
},
},
'conditions': [
['target_os=="tizen"', {
'defines': ['HOST_TIZEN'],
}],
],
},
'conditions': [
['target_os=="tizen"', {
'defines': ['HOST_TIZEN'],
'target_defaults': {
'cflags': [
'-Os',
'-fPIE',
'-fstack-protector-strong',
'-D_FORTIFY_SOURCE=2',
],
'ldflags': [
'-pie',
'-Wl,-z,relro,-z,now',
],
},
}],
['asan==1', {
'cflags+': [ '-fsanitize=address', '-fno-omit-frame-pointer', '-fno-common', '-D_FORTIFY_SOURCE=2' ],
'cflags_cc+': [ '-fsanitize=address', '-fno-omit-frame-pointer', '-fno-common', '-D_FORTIFY_SOURCE=2' ],
'cflags!': [ '-fomit-frame-pointer' ],
'ldflags': [ '-fsanitize=address' ],
'libraries': [ '-lasan' ],
}],
],
},
}