forked from chen3feng/blade-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
opensource.conf
108 lines (99 loc) · 2.71 KB
/
opensource.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
# Configure file for using blade without google-libs
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"
],
cxx_warnings = [
"-Wno-invalid-offsetof",
"-Woverloaded-virtual",
"-Wnon-virtual-dtor",
"-Wvla",
"-Werror=vla",
"-Werror=non-virtual-dtor"
],
c_warnings = ["-Werror-implicit-function-declaration"],
cppflags = ['-DHAVE_CONFIG_H'], # Required by thrift
)
cc_test_config(
dynamic_link=False,
heap_check='strict',
gperftools_libs=['#tcmalloc'],
gperftools_debug_libs=['#tcmalloc_debug'],
gtest_libs=['#gtest'],
gtest_main_libs=['#gtest_main']
)
"""
cc_binary_config(
extra_libs=['#jemalloc']
)
"""
distcc_config(
enabled=False
)
link_config(
link_on_tmp=False,
enable_dccc=False
)
proto_library_config(
protoc='protoc',
protobuf_libs=['#protobuf', '#glog', '#gflags', '#pthread'],
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'
)
"""