From 57bd6e0acf5549102c620840a9dc4fd66d79e6f8 Mon Sep 17 00:00:00 2001 From: bzhao Date: Tue, 18 Aug 2020 21:27:29 +0800 Subject: [PATCH 1/3] Update the right logic like previous The Arm judgment branch is different with previous, and cause the build fail on linux_aarch64. --- tensorflow/core/platform/platform.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tensorflow/core/platform/platform.h b/tensorflow/core/platform/platform.h index 3375a6e50eb..cc71f95b351 100644 --- a/tensorflow/core/platform/platform.h +++ b/tensorflow/core/platform/platform.h @@ -46,11 +46,6 @@ limitations under the License. #define PLATFORM_POSIX // EMSCRIPTEN builds are considered "mobile" for the sake of portability. #define IS_MOBILE_PLATFORM - -#elif defined(__arm__) || defined(__aarch64__) -// If no platform specified, use: -#define PLATFORM_POSIX - // Require an outside macro to tell us if we're building for Raspberry Pi or // another ARM device that's not a mobile platform. #if !defined(RASPBERRY_PI) && !defined(ARM_NON_MOBILE) && \ @@ -58,6 +53,10 @@ limitations under the License. #define IS_MOBILE_PLATFORM #endif +#elif defined(__arm__) || defined(__aarch64__) +// If no platform specified, use: +#define PLATFORM_POSIX + #else // If no platform specified, use: #define PLATFORM_POSIX From bcd2ab52cd19d5d76e7fb56d3cdc02ff5c9d1428 Mon Sep 17 00:00:00 2001 From: bzhao Date: Fri, 28 Aug 2020 09:34:25 +0800 Subject: [PATCH 2/3] Update PR with reviews --- tensorflow/core/platform/platform.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tensorflow/core/platform/platform.h b/tensorflow/core/platform/platform.h index cc71f95b351..8097feb75dc 100644 --- a/tensorflow/core/platform/platform.h +++ b/tensorflow/core/platform/platform.h @@ -46,12 +46,6 @@ limitations under the License. #define PLATFORM_POSIX // EMSCRIPTEN builds are considered "mobile" for the sake of portability. #define IS_MOBILE_PLATFORM -// Require an outside macro to tell us if we're building for Raspberry Pi or -// another ARM device that's not a mobile platform. -#if !defined(RASPBERRY_PI) && !defined(ARM_NON_MOBILE) && \ - !defined(PLATFORM_GOOGLE) -#define IS_MOBILE_PLATFORM -#endif #elif defined(__arm__) || defined(__aarch64__) // If no platform specified, use: From 13049d927a1822972cf65edf2472c8db686d7749 Mon Sep 17 00:00:00 2001 From: bzhao Date: Sat, 29 Aug 2020 09:30:18 +0800 Subject: [PATCH 3/3] remove the elif branch which already covered by else --- tensorflow/core/platform/platform.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tensorflow/core/platform/platform.h b/tensorflow/core/platform/platform.h index 8097feb75dc..8241fe0bc00 100644 --- a/tensorflow/core/platform/platform.h +++ b/tensorflow/core/platform/platform.h @@ -47,10 +47,6 @@ limitations under the License. // EMSCRIPTEN builds are considered "mobile" for the sake of portability. #define IS_MOBILE_PLATFORM -#elif defined(__arm__) || defined(__aarch64__) -// If no platform specified, use: -#define PLATFORM_POSIX - #else // If no platform specified, use: #define PLATFORM_POSIX