1 Star 0 Fork 5

zhaoyao/flare

forked from Tencent/flare 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
BLADE_ROOT 4.53 KB
一键复制 编辑 原始数据 按行查看 历史
def get_env(s):
import os
return os.environ[s] if s in os.environ else None
global_config(
duplicated_source_action = 'error',
test_timeout = 600, # In seconds
glob_error_severity = 'error',
legacy_public_targets = load_value('legacy_public_targets.conf'),
)
cc_test_config(
# `initial-exec` TLS does not work quite well on ppc64le if dynamic linking
# is used.
dynamic_link=not build_target.is_debug() and build_target.arch != 'ppc64le',
# Doesn't work quite right on AArch64. (It does work on ppc64le, though.)
#
# Stacktrace suggests that it's related to global initialization order
# fiasco.
heap_check='strict' if build_target.arch != 'aarch64' else '',
gperftools_libs='thirdparty/gperftools:tcmalloc',
gtest_libs=['thirdparty/googletest:gtest', '#pthread'],
gtest_main_libs=['thirdparty/googletest:gtest_main'],
pprof_path = 'thirdparty/gperftools/bin/pprof',
)
cc_config(
cppflags=[
'-gdwarf-2',
'-mcx16' if build_target.arch == 'x86_64' else '',
],
cflags = '-std=gnu11',
cxxflags = [
'-std=gnu++2a',
# This option must be applied here. Options applied in `warnings` are
# not applied to generated source files (e.g., those generated by
# `protoc`.). In practice, `-Wpsabi` produces some diagnostics when
# compiling `.pb.cc` on ppc64le, this option suppress those diagnostics.
'-Wno-psabi' if build_target.arch == 'ppc64le' else '',
],
# NOTE: Please keep all warnings in order in one same group.
warnings = [
'-Werror',
'-Wall',
'-Wextra',
# other useful warnings
'-Warray-bounds',
'-Wchar-subscripts',
'-Wcomment',
'-Wendif-labels',
'-Wformat=1',
# '-Wframe-larger-than=69632', # A 64k buffer and other small vars
'-Wmissing-include-dirs',
'-Wmultichar',
'-Wparentheses',
'-Wpointer-arith',
'-Wreturn-type',
'-Wsequence-point',
'-Wswitch',
'-Wunused-function',
'-Wunused-label',
'-Wunused-result',
'-Wunused-value',
'-Wwrite-strings',
# Suppress all warnings which we can't handle or are misreported.
# Even if some them are sure useful, too many warnings also overwhelm
# the true problems.
'-Wno-format-truncation',
'-Wno-float-equal',
# '-Wno-incompatible-pointer-types',
# Causes too many 'note's when it is disabled due to the size of the code
'-Wno-misleading-indentation',
'-Wno-missing-field-initializers',
'-Wno-sign-compare',
'-Wno-strict-aliasing',
'-Wno-unused-but-set-variable',
'-Wno-unused-local-typedefs',
'-Wno-unused-parameter',
],
# C++ only warning flags
cxx_warnings = [
'-Wnon-virtual-dtor',
'-Woverloaded-virtual',
# Suppress all warnings which we can't handle or are misreported.
'-Wno-deprecated',
'-Wno-invalid-offsetof',
],
extra_incs=[
# for all thirdparty packages
'thirdparty/',
],
linkflags = [
'-Wl,--no-as-needed -lpthread -Wl,--as-needed',
],
benchmark_libs = ['//thirdparty/benchmark:benchmark'],
benchmark_main_libs = ['//thirdparty/benchmark:benchmark_main'],
allowed_undeclared_hdrs = load_value('allowed_undeclared_hdrs.conf'),
# header_inclusion_dependencies = True,
hdr_dep_missing_severity = 'error',
)
cc_binary_config(
run_lib_paths = ['//thirdparty/jdk/lib'],
)
cc_library_config(
generate_dynamic = True,
arflags = ['rcsDT'],
prebuilt_libpath_pattern = 'lib${bits}',
hdrs_missing_severity = 'error',
hdrs_missing_suppress = load_value('hdrs_missing_suppress.conf'),
)
proto_library_config(
protoc='thirdparty/protobuf/bin/%s/protoc-3.4.1' % build_target.arch,
protobuf_libs=['//thirdparty/protobuf:protobuf'],
protobuf_path='thirdparty',
protobuf_incs = 'thirdparty/protobuf-3.4.1/src',
protoc_direct_dependencies=True,
well_known_protos = [
"google/protobuf/any.proto",
"google/protobuf/api.proto",
"google/protobuf/compiler/plugin.proto",
"google/protobuf/descriptor.proto",
"google/protobuf/duration.proto",
"google/protobuf/empty.proto",
"google/protobuf/field_mask.proto",
"google/protobuf/source_context.proto",
"google/protobuf/struct.proto",
"google/protobuf/timestamp.proto",
"google/protobuf/type.proto",
"google/protobuf/wrappers.proto",
],
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/zhaoyao219/flare.git
git@gitee.com:zhaoyao219/flare.git
zhaoyao219
flare
flare
master

搜索帮助