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

Fix docker bazel build

上级 c489ee46
...@@ -6,20 +6,23 @@ cc_binary( ...@@ -6,20 +6,23 @@ cc_binary(
srcs = [ srcs = [
"helloworld.cc", "helloworld.cc",
], ],
copts = ["-std=c++11"],
deps = [ deps = [
"//mace/core", "//mace/core",
"//mace/ops", "//mace/ops",
], ],
copts = ["-std=c++11"],
linkopts = if_android(["-ldl"]),
) )
cc_test( cc_test(
name = "benchmark_example", name = "benchmark_example",
srcs = ["benchmark_example.cc"], srcs = ["benchmark_example.cc"],
copts = ["-std=c++11"],
linkstatic = 1,
deps = [ deps = [
"//mace/core", "//mace/core",
"//mace/core:test_benchmark_main", "//mace/core:test_benchmark_main",
], ],
copts = ["-std=c++11"],
linkopts = if_android(["-ldl"]),
linkstatic = 1,
testonly = 1,
) )
...@@ -18,9 +18,7 @@ cc_library( ...@@ -18,9 +18,7 @@ cc_library(
"//mace/core:core", "//mace/core:core",
], ],
copts = ['-std=c++11'], copts = ['-std=c++11'],
linkopts = ["-fopenmp"] + if_android([ linkopts = ["-fopenmp"] + if_android(["-lm"]),
"-lm",
]),
) )
cc_test( cc_test(
...@@ -32,9 +30,7 @@ cc_test( ...@@ -32,9 +30,7 @@ cc_test(
"//mace/core:core", "//mace/core:core",
], ],
copts = ['-std=c++11'], copts = ['-std=c++11'],
linkopts = if_android([ linkopts = if_android(["-pie"]),
"-pie",
]),
linkstatic = 1, linkstatic = 1,
testonly = 1, testonly = 1,
) )
......
...@@ -31,12 +31,12 @@ cc_library( ...@@ -31,12 +31,12 @@ cc_library(
["*.h"], ["*.h"],
exclude = ["ops_test_util.h"], exclude = ["ops_test_util.h"],
), ),
copts = ["-std=c++11"],
deps = [ deps = [
"//mace/core", "//mace/core",
"//mace/kernels", "//mace/kernels",
"//mace/proto:cc_proto", "//mace/proto:cc_proto",
], ],
copts = ["-std=c++11"],
alwayslink = 1, alwayslink = 1,
) )
...@@ -45,13 +45,15 @@ cc_test( ...@@ -45,13 +45,15 @@ cc_test(
srcs = glob( srcs = glob(
["*_test.cc"], ["*_test.cc"],
), ),
copts = ["-std=c++11"],
linkstatic = 1,
deps = [ deps = [
":ops", ":ops",
":test", ":test",
"@gtest//:gtest_main", "@gtest//:gtest_main",
], ],
copts = ["-std=c++11"],
linkopts = if_android(["-ldl"]),
linkstatic = 1,
testonly = 1,
) )
cc_test( cc_test(
...@@ -64,6 +66,7 @@ cc_test( ...@@ -64,6 +66,7 @@ cc_test(
"//mace/core:test_benchmark_main", "//mace/core:test_benchmark_main",
], ],
copts = ['-std=c++11'], copts = ['-std=c++11'],
linkopts = if_android(["-ldl"]),
linkstatic = 1, linkstatic = 1,
testonly = 1, testonly = 1,
) )
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册