From e2b17134934ded92ab731e4429e30f40b4fbb2db Mon Sep 17 00:00:00 2001 From: yejianwu Date: Mon, 28 May 2018 17:42:42 +0800 Subject: [PATCH] fix tuner_test --- mace/utils/BUILD | 2 +- mace/utils/tuner_test.cc | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mace/utils/BUILD b/mace/utils/BUILD index 76e8864a..b1d62e0d 100644 --- a/mace/utils/BUILD +++ b/mace/utils/BUILD @@ -64,7 +64,7 @@ cc_test( "tuner_test.cc", ], copts = ["-Werror", "-Wextra", "-Wno-missing-field-initializers"], - linkopts = if_android([ + linkopts = ["-ldl"] + if_android([ "-pie", "-lm", # Required by unordered_map ]), diff --git a/mace/utils/tuner_test.cc b/mace/utils/tuner_test.cc index c618a182..bd590ac9 100644 --- a/mace/utils/tuner_test.cc +++ b/mace/utils/tuner_test.cc @@ -33,6 +33,8 @@ TEST_F(TunerTest, SimpleRun) { int expect = 1; auto TunerFunc = [&](const std::vector ¶ms, Timer *timer, std::vector *tuning_result) -> int { + (void)(timer); + (void)(tuning_result); if (params.front() == 1) { return expect; } else { -- GitLab