forked from chen3feng/blade-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
blade.conf
115 lines (108 loc) · 3.09 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
cc_config(
extra_incs='thirdparty',
warnings = [
"-Wall",
"-Wextra",
# disable some warnings enabled by Wextra
"-Wno-unused-but-set-variable",
"-Wno-unused-parameter",
"-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=conversion-null",
"-Werror=empty-body",
"-Werror=endif-labels",
"-Werror=format",
"-Werror=format-nonliteral",
"-Werror=missing-include-dirs",
"-Werror=non-virtual-dtor",
"-Werror=overflow",
"-Werror=overloaded-virtual",
"-Werror=parentheses",
"-Werror=reorder",
"-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",
"-Woverloaded-virtual",
"-Wnon-virtual-dtor",
"-Wvla",
"-Werror=vla",
"-Werror=non-virtual-dtor"
],
# C++ only warning flags
c_warnings = ["-Werror-implicit-function-declaration"],
cpplint = 'cpplint.py', # Default is unpathed cpplint.py command
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']
)
distcc_config(
enabled=False
)
link_config(
link_on_tmp=False,
enable_dccc=False
)
proto_library_config(
protoc='thirdparty/protobuf/bin/protoc',
protobuf_libs=['//thirdparty/protobuf:protobuf'],
protobuf_path='thirdparty',
protobuf_incs = 'thirdparty',
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=[],
)
"""
java_config(
source_version='1.6',
target_version='1.6'
)
"""