-
Notifications
You must be signed in to change notification settings - Fork 497
/
blade.conf
142 lines (132 loc) · 3.81 KB
/
blade.conf
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
global_config(
)
cc_config(
extra_incs=[],
warnings = [
'-Wall',
'-Wextra',
# disable some warnings enabled by Wextra
'-Wno-unused-but-set-variable',
'-Wno-unused-parameter',
'-Wno-unused-local-typedefs',
'-Wno-missing-field-initializers',
# other useful warnings
'-Wendif-labels',
'-Wfloat-equal',
'-Wformat=2',
'-Wframe-larger-than=69632', # A 64k buffer and other small vars
'-Wmissing-include-dirs',
'-Wpointer-arith',
'-Wwrite-strings',
# error flags
'-Werror=char-subscripts',
'-Werror=comments',
'-Werror=empty-body',
'-Werror=endif-labels',
'-Werror=format',
'-Werror=format-nonliteral',
'-Werror=missing-include-dirs',
'-Werror=overflow',
'-Werror=parentheses',
'-Werror=return-type',
'-Werror=sequence-point',
'-Werror=sign-compare',
'-Werror=switch',
'-Werror=type-limits',
'-Werror=uninitialized',
# Masked it at first
# '-Werror=unused-function',
'-Werror=unused-label',
'-Werror=unused-result',
'-Werror=unused-value',
'-Werror=unused-variable',
'-Werror=write-strings',
],
# C++ only warning flags
cxx_warnings = [
'-Wno-invalid-offsetof',
'-Wnon-virtual-dtor',
'-Woverloaded-virtual',
'-Wvla',
'-Werror=conversion-null',
'-Werror=non-virtual-dtor',
'-Werror=overloaded-virtual',
'-Werror=reorder',
'-Werror=vla',
],
# C only warning flags
c_warnings = ['-Werror-implicit-function-declaration'],
optimize = ['-O2'],
benchmark_libs=['//toft/base:benchmark'],
benchmark_main_libs=['//toft/base:benchmark_main'],
)
"""
# You can append to list options now
cc_config(
append = config_items(
extra_incs = ['abc'], # Append abc to existed extra_incs
warnings = ['-Wxxxx'] # Add -Wxxxx to existed warnings
...
)
)
"""
cc_test_config(
dynamic_link=False,
heap_check='',
gperftools_libs=['thirdparty/perftools:tcmalloc'],
gperftools_debug_libs=['thirdparty/perftools:tcmalloc_debug'],
gtest_libs=['thirdparty/gtest:gtest'],
gtest_main_libs=['thirdparty/gtest:gtest_main']
)
cuda_config(
cuda_path = '',
cu_warnings = [],
cuflags = [],
)
proto_library_config(
protoc='thirdparty/protobuf/bin/protoc',
protobuf_libs=['//thirdparty/protobuf:protobuf'],
protobuf_path='thirdparty',
protobuf_incs = 'thirdparty',
protobuf_java_libs = [],
protobuf_php_path='thirdparty/Protobuf-PHP/library',
protoc_php_plugin='thirdparty/Protobuf-PHP/protoc-gen-php.php'
)
thrift_library_config(
# The path to thrift compiler.
thrift='/usr/local/bin/thrift',
# The libraries depended by thrift.
thrift_libs=['#thrift', '#pthread'],
# The extra include paths to be passed to thrift compiler.
thrift_incs=[],
# The extra gen params
thrift_gen_params='cpp:include_prefix,pure_enums',
)
fbthrift_library_config(
# The path to thrift compilers.
fbthrift1='fbthrift/compiler/thrift1',
fbthrift2='fbthrift/compiler/thrift2',
# The libraries depended by thrift.
fbthrift_libs=[
'//fbthrift/thrift/lib/cpp:cpp',
'//fbthrift/thrift/lib/cpp2:cpp2',
],
# The extra include paths to be passed to thrift compiler.
fbthrift_incs=[],
)
"""
java_config(
version = '1.6',
source_version = '1.6',
target_version = '1.6'
maven = 'mvn', # How to execute the 'mvn' command
maven_central = 'http://repo1.maven.org/maven2/',
warnings = ['-Werror', '-Xlint:all'],
source_encoding = 'utf-8',
java_home = '/path/to/jdk'
)
java_test_config(
junit_libs = [...],
jacoco_home = 'path/to/jacoco',
)
"""