Skip to content

Commit

Permalink
Fix - x86_64 hard coded in Target/CMakeLists.txt
Browse files Browse the repository at this point in the history
Update to lldb version causes build failure on aarch64 machines due to hard coding of x86_64 hard coded in source/Target/CMakeLists.txt
lldb - swift-lldb PR #962
  • Loading branch information
futurejones committed Jan 22, 2019
1 parent 636544e commit da810ac
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions swift-for-tensorflow-patches/lldb-reflection-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 2677b85040b939353b8b529a4a0b1cfdfad004ed Mon Sep 17 00:00:00 2001
From: Michael Munday <mike.munday@ibm.com>
Date: Mon, 8 Oct 2018 09:48:40 -0400
Subject: [PATCH] [CMake] Fix reflection lib name on non-x86_64 Linux
platforms.

Remove the hardcoded instance of 'x86_64' and query the platform's
processor name instead.
---
source/Target/CMakeLists.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/source/Target/CMakeLists.txt b/source/Target/CMakeLists.txt
index f6bbd6f8ce8..711b4a48df7 100644
--- a/source/Target/CMakeLists.txt
+++ b/source/Target/CMakeLists.txt
@@ -3,7 +3,8 @@ include_directories(../Plugins/Process/Utility)
set(REFLECTION_LIB "swiftReflection")

if(CMAKE_SYSTEM_NAME MATCHES "Linux")
- set(REFLECTION_LIB "swiftReflection-linux-x86_64")
+ # CMAKE_SYSTEM_PROCESSOR is equivalent to `uname -p` on Linux.
+ set(REFLECTION_LIB "swiftReflection-linux-${CMAKE_SYSTEM_PROCESSOR}")
endif()

if(CMAKE_SYSTEM_NAME MATCHES "Darwin")

0 comments on commit da810ac

Please sign in to comment.