diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-08-21 13:21:13 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-08-21 13:27:24 -0700 |
commit | 75adfa5ca180abdd1ccf9408078906e5874c9e2a (patch) | |
tree | 5367d71ff099a70918270580120896ef4309992b /tensorflow/contrib/makefile | |
parent | 7cc6abab4e3569e4e44af7d577a71d15039f014b (diff) |
Fully enabled absl and removed TENSORFLOW_USE_ABSL define (as absl is now always available).
Previously, absl was not enabled for mobile or for makefile-based builds.
PiperOrigin-RevId: 209648505
Diffstat (limited to 'tensorflow/contrib/makefile')
-rw-r--r-- | tensorflow/contrib/makefile/Makefile | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/tensorflow/contrib/makefile/Makefile b/tensorflow/contrib/makefile/Makefile index 1a1ab54a53..dc846b0c0c 100644 --- a/tensorflow/contrib/makefile/Makefile +++ b/tensorflow/contrib/makefile/Makefile @@ -90,6 +90,7 @@ HOST_INCLUDES := \ -I$(MAKEFILE_DIR)/downloads/nsync/public \ -I$(MAKEFILE_DIR)/downloads/fft2d \ -I$(MAKEFILE_DIR)/downloads/double_conversion \ +-I$(MAKEFILE_DIR)/downloads/absl \ -I$(HOST_GENDIR) ifeq ($(HAS_GEN_HOST_PROTOC),true) HOST_INCLUDES += -I$(MAKEFILE_DIR)/gen/protobuf-host/include @@ -116,6 +117,21 @@ ifeq ($(HOST_OS),PI) HOST_LIBS += -ldl -lpthread endif +# Abseil sources. +ABSL_CC_ALL_SRCS := \ +$(wildcard tensorflow/contrib/makefile/downloads/absl/absl/*/*.cc) \ +$(wildcard tensorflow/contrib/makefile/downloads/absl/absl/*/*/*.cc) \ +$(wildcard tensorflow/contrib/makefile/downloads/absl/absl/*/*/*/*.cc) \ +$(wildcard tensorflow/contrib/makefile/downloads/absl/absl/*/*/*/*/*.cc) + +ABSL_CC_EXCLUDE_SRCS := \ +$(wildcard tensorflow/contrib/makefile/downloads/absl/absl/*/*test*.cc) \ +$(wildcard tensorflow/contrib/makefile/downloads/absl/absl/*/*/*test*.cc) \ +$(wildcard tensorflow/contrib/makefile/downloads/absl/absl/*/*/*/*test*.cc) \ +$(wildcard tensorflow/contrib/makefile/downloads/absl/absl/*/*/*/*/*test*.cc) \ +tensorflow/contrib/makefile/downloads/absl/absl/synchronization/internal/mutex_nonprod.cc + +ABSL_CC_SRCS := $(filter-out $(ABSL_CC_EXCLUDE_SRCS), $(ABSL_CC_ALL_SRCS)) # proto_text is a tool that converts protobufs into a form we can use more # compactly within TensorFlow. It's a bit like protoc, but is designed to @@ -125,7 +141,9 @@ endif PROTO_TEXT := $(HOST_BINDIR)proto_text # The list of dependencies is derived from the Bazel build file by running # the gen_file_lists.sh script on a system with a working Bazel setup. -PROTO_TEXT_CC_FILES := $(shell cat $(MAKEFILE_DIR)/proto_text_cc_files.txt) +PROTO_TEXT_CC_FILES := \ + $(ABSL_CC_SRCS) \ + $(shell cat $(MAKEFILE_DIR)/proto_text_cc_files.txt) PROTO_TEXT_PB_CC_LIST := \ $(shell cat $(MAKEFILE_DIR)/proto_text_pb_cc_files.txt) \ $(wildcard tensorflow/contrib/makefile/downloads/double_conversion/double-conversion/*.cc) @@ -175,6 +193,7 @@ INCLUDES := \ -I$(MAKEFILE_DIR)/downloads/nsync/public \ -I$(MAKEFILE_DIR)/downloads/fft2d \ -I$(MAKEFILE_DIR)/downloads/double_conversion \ +-I$(MAKEFILE_DIR)/downloads/absl \ -I$(PROTOGENDIR) \ -I$(PBTGENDIR) ifeq ($(HAS_GEN_HOST_PROTOC),true) @@ -236,7 +255,6 @@ ifeq ($(TARGET),PI) endif # Set up Android building -# LINT.IfChange ifeq ($(TARGET),ANDROID) # Override NDK_ROOT on the command line with your own NDK location, e.g. # make -f tensorflow/contrib/makefile/Makefile TARGET=ANDROID \ @@ -331,6 +349,7 @@ $(MARCH_OPTION) \ -I$(MAKEFILE_DIR)/downloads/nsync/public \ -I$(MAKEFILE_DIR)/downloads/fft2d \ -I$(MAKEFILE_DIR)/downloads/double_conversion \ +-I$(MAKEFILE_DIR)/downloads/absl \ -I$(MAKEFILE_DIR)/gen/protobuf_android/$(ANDROID_ARCH)/include \ -I$(PROTOGENDIR) \ -I$(PBTGENDIR) @@ -446,7 +465,6 @@ $(MARCH_OPTION) \ DEPDIR := $(DEPDIR)android_$(ANDROID_ARCH)/ endif # ifeq ($(BUILD_FOR_TEGRA),1) endif # ANDROID -# LINT.ThenChange(//tensorflow/contrib/android/cmake/CMakeLists.txt) # Settings for iOS. ifeq ($(TARGET),IOS) @@ -596,6 +614,7 @@ BENCHMARK_NAME := $(BINDIR)benchmark # gen_file_lists.sh script. CORE_CC_ALL_SRCS := \ +$(ABSL_CC_SRCS) \ $(wildcard tensorflow/core/*.cc) \ $(wildcard tensorflow/core/common_runtime/*.cc) \ $(wildcard tensorflow/core/framework/*.cc) \ |