From b1347d0e3110dd20ce13bc8b6fb67548db6c3d0f Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Tue, 15 May 2018 20:14:18 -0700 Subject: [PATCH] Hardcode two exceptions to the list of files allowed in a 'platform' PiperOrigin-RevId: 196771621 --- tensorflow/core/platform/default/build_config.bzl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tensorflow/core/platform/default/build_config.bzl b/tensorflow/core/platform/default/build_config.bzl index f6e09ef..63ffe7d 100644 --- a/tensorflow/core/platform/default/build_config.bzl +++ b/tensorflow/core/platform/default/build_config.bzl @@ -448,6 +448,16 @@ def tf_platform_srcs(files): base_set = ["platform/default/" + f for f in files] windows_set = base_set + ["platform/windows/" + f for f in files] posix_set = base_set + ["platform/posix/" + f for f in files] + + # Handle cases where we must also bring the posix file in. Usually, the list + # of files to build on windows builds is just all the stuff in the + # windows_set. However, in some cases the implementations in 'posix/' are + # just what is necessary and historically we choose to simply use the posix + # file instead of making a copy in 'windows'. + for f in files: + if f == "error.cc": + windows_set.append("platform/posix/" + f) + return select({ "//tensorflow:windows" : native.glob(windows_set), "//tensorflow:windows_msvc" : native.glob(windows_set), -- 2.7.4