提交 e175a1fc 编写于 作者: L Liangliang He

Fix no return error

上级 1359d640
......@@ -10,7 +10,7 @@ load("//mace:mace.bzl", "if_embed_binary_program")
cc_library(
name = "generated_models_lib",
srcs = glob(["models/*/*.cc"]),
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1"],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1", "-Werror=return-type"],
linkstatic = 1,
deps = [
"//mace/core",
......@@ -25,21 +25,21 @@ cc_library(
cc_library(
name = "generated_opencl_lib",
srcs = glob(["opencl/*.cc"]),
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1"],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1", "-Werror=return-type"],
linkstatic = 1,
)
cc_library(
name = "generated_tuning_lib",
srcs = glob(["tuning/*.cc"]),
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1"],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1", "-Werror=return-type"],
linkstatic = 1,
)
cc_library(
name = "version_lib",
srcs = glob(["version/*.cc"]),
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1"],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1", "-Werror=return-type"],
linkstatic = 1,
deps = [
"//mace/core",
......
......@@ -21,7 +21,7 @@ cc_library(
"runtime/opencl/cl2.hpp",
"runtime/opencl/*.h",
]),
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1"] +
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1", "-Werror=return-type"] +
if_profiling_enabled(["-DMACE_OPENCL_PROFILING"]) +
if_embed_binary_program(["-DMACE_EMBED_BINARY_PROGRAM"]),
linkopts = if_android(["-pie", "-ldl"]),
......@@ -43,7 +43,7 @@ cc_library(
"testing/test_benchmark.cc",
"testing/test_benchmark_main.cc",
],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1"],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1", "-Werror=return-type"],
alwayslink = 1,
deps = [
":core",
......
......@@ -14,7 +14,10 @@ OperatorBase::OperatorBase(const OperatorDef &operator_def, Workspace *ws)
OpKeyBuilder::OpKeyBuilder(const char *op_name) : op_name_(op_name) {}
OpKeyBuilder &OpKeyBuilder::Device(DeviceType device) { device_type_ = device; }
OpKeyBuilder &OpKeyBuilder::Device(DeviceType device) {
device_type_ = device;
return *this;
}
OpKeyBuilder &OpKeyBuilder::TypeConstraint(const char *attr_name,
const DataType allowed) {
......
......@@ -6,7 +6,7 @@ cc_binary(
srcs = [
"helloworld.cc",
],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1"],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1", "-Werror=return-type"],
linkopts = if_enable_neon(["-fopenmp"]),
deps = [
"//mace/core",
......@@ -18,7 +18,7 @@ cc_test(
name = "benchmark_example",
testonly = 1,
srcs = ["benchmark_example.cc"],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1"],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1", "-Werror=return-type"],
linkopts = if_enable_neon(["-fopenmp"]),
linkstatic = 1,
deps = [
......@@ -30,7 +30,7 @@ cc_test(
cc_binary(
name = "mace_run",
srcs = ["mace_run.cc"],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1"],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1", "-Werror=return-type"],
linkopts = if_enable_neon(["-fopenmp"]),
linkstatic = 1,
deps = [
......
......@@ -20,6 +20,7 @@ cc_library(
copts = [
"-std=c++11",
"-D_GLIBCXX_USE_C99_MATH_TR1",
"-Werror=return-type",
] +
if_embed_binary_program(["-DMACE_EMBED_BINARY_PROGRAM"]) +
if_enable_neon(["-fopenmp"]),
......@@ -34,7 +35,7 @@ cc_test(
name = "kernel_test",
testonly = 1,
srcs = glob(["test/*.cc"]),
copts = ["-std=c++11"],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1", "-Werror=return-type"],
linkopts = if_android(["-pie"]),
linkstatic = 1,
deps = [
......@@ -48,7 +49,7 @@ cc_test(
name = "benchmark",
testonly = 1,
srcs = glob(["benchmark/*.cc"]),
copts = ["-std=c++11"],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1", "-Werror=return-type"],
linkstatic = 1,
deps = [
":kernels",
......
......@@ -34,7 +34,7 @@ cc_library(
["*.h"],
exclude = ["ops_test_util.h"],
),
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1"] +
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1", "-Werror=return-type"] +
if_enable_neon(["-DMACE_ENABLE_NEON"]),
deps = [
"//mace/kernels",
......@@ -48,7 +48,7 @@ cc_test(
srcs = glob(
["*_test.cc"],
),
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1"],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1", "-Werror=return-type"],
linkopts = ["-fopenmp"],
linkstatic = 1,
deps = [
......@@ -62,7 +62,7 @@ cc_test(
name = "ops_benchmark",
testonly = 1,
srcs = glob(["*_benchmark.cc"]),
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1"],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1", "-Werror=return-type"],
linkopts = ["-fopenmp"],
linkstatic = 1,
deps = [
......
......@@ -7,7 +7,7 @@ cc_library(
name = "stat_summarizer",
srcs = ["stat_summarizer.cc"],
hdrs = ["stat_summarizer.h"],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1"],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1", "-Werror=return-type"],
linkstatic = 1,
deps = [
"//mace/core",
......@@ -19,7 +19,7 @@ cc_binary(
srcs = [
"benchmark_model.cc",
],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1"],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1", "-Werror=return-type"],
linkstatic = 1,
deps = [
":stat_summarizer",
......
......@@ -17,7 +17,7 @@ cc_library(
hdrs = [
"logging.h",
],
copts = ["-std=c++11"],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1", "-Werror=return-type"],
linkopts = if_android([
"-llog",
]),
......@@ -31,7 +31,7 @@ cc_library(
hdrs = [
"command_line_flags.h",
],
copts = ["-std=c++11"],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1", "-Werror=return-type"],
deps = [
":logging",
],
......@@ -43,7 +43,7 @@ cc_library(
"tuner.h",
"timer.h",
],
copts = ["-std=c++11"],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1", "-Werror=return-type"],
deps = [
":utils_hdrs",
":logging",
......@@ -56,7 +56,7 @@ cc_test(
srcs = [
"tuner_test.cc",
],
copts = ["-std=c++11"],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1", "-Werror=return-type"],
linkopts = if_android(["-pie", "-lm"]),
linkstatic = 1,
deps = [
......@@ -72,7 +72,7 @@ cc_library(
"utils.h",
"env_time.h",
],
copts = ["-std=c++11"],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1", "-Werror=return-type"],
)
cc_library(
......@@ -83,4 +83,5 @@ cc_library(
":command_line_flags",
":logging",
],
copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1", "-Werror=return-type"],
)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册