aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Shashi Shekhar <shashishekhar@google.com>2018-06-12 10:47:09 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-06-12 10:50:07 -0700
commitd820151d5719532155b8637ec7baa75ff4c7ebbd (patch)
tree49640016270e607041fa081cff2a85f0318f9492
parentb0a15f21d2009ead9c8ed5e245a02b5c42355853 (diff)
Fix a few copts.
PiperOrigin-RevId: 200241859
-rw-r--r--tensorflow/contrib/lite/profiling/BUILD7
-rw-r--r--tensorflow/contrib/lite/tools/benchmark/BUILD13
2 files changed, 11 insertions, 9 deletions
diff --git a/tensorflow/contrib/lite/profiling/BUILD b/tensorflow/contrib/lite/profiling/BUILD
index c31189f2b1..a162b87b8f 100644
--- a/tensorflow/contrib/lite/profiling/BUILD
+++ b/tensorflow/contrib/lite/profiling/BUILD
@@ -2,9 +2,11 @@ package(default_visibility = ["//visibility:public"])
licenses(["notice"]) # Apache 2.0
+load("//tensorflow/contrib/lite:build_def.bzl", "tflite_copts")
+
common_copts = [
"-Wall",
-]
+] + tflite_copts()
cc_library(
name = "profiler",
@@ -36,12 +38,14 @@ cc_library(
name = "time",
srcs = ["time.cc"],
hdrs = ["time.h"],
+ copts = common_copts,
)
cc_library(
name = "profile_summarizer",
srcs = ["profile_summarizer.cc"],
hdrs = ["profile_summarizer.h"],
+ copts = common_copts,
deps = [
":profiler",
"//tensorflow/contrib/lite:framework",
@@ -53,6 +57,7 @@ cc_library(
cc_test(
name = "profile_summarizer_test",
srcs = ["profile_summarizer_test.cc"],
+ copts = common_copts,
deps = [
":profile_summarizer",
"//tensorflow/contrib/lite:framework",
diff --git a/tensorflow/contrib/lite/tools/benchmark/BUILD b/tensorflow/contrib/lite/tools/benchmark/BUILD
index f918010e2b..96c6b6872e 100644
--- a/tensorflow/contrib/lite/tools/benchmark/BUILD
+++ b/tensorflow/contrib/lite/tools/benchmark/BUILD
@@ -8,7 +8,7 @@ load("//tensorflow/contrib/lite:special_rules.bzl", "tflite_portable_test_suite"
load("//tensorflow/contrib/lite:build_def.bzl", "tflite_linkopts")
load("//tensorflow/contrib/lite:build_def.bzl", "tflite_copts")
-common_copts = ["-Wall"]
+common_copts = ["-Wall"] + tflite_copts()
cc_binary(
name = "benchmark_model",
@@ -16,14 +16,11 @@ cc_binary(
"benchmark_main.cc",
"logging.h",
],
- copts = tflite_copts() + common_copts,
- linkopts = select({
+ copts = common_copts,
+ linkopts = tflite_linkopts() + select({
"//tensorflow:android": [
- "-pie",
- "-landroid",
- "-lm",
- "-z defs",
- "-Wl,--exclude-libs,ALL", # Exclude syms in all libs from auto export
+ "-pie", # Android 5.0 and later supports only PIE
+ "-lm", # some builtin ops, e.g., tanh, need -lm
],
"//conditions:default": [],
}),