Commit e97d659c authored by Cory Quammen's avatar Cory Quammen Committed by Kitware Robot
Browse files

Merge topic 'release-llvm-target-architecture' into release

637acd2c

 llvm: set targets to build string based on system processor
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !649
parents a7917e0f 637acd2c
......@@ -7,6 +7,20 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Intel")
PROJECT_ONLY)
endif ()
# Check the target processor to configure LLVM properly. Possible
# targets are: AArch64, AMDGPU, ARM, BPF, Hexagon, Mips, MSP430,
# NVPTX, PowerPC, Sparc, SystemZ, X86, XCore.
# See https://llvm.org/docs/GettingStarted.html.
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" cmake_system_processor)
if (cmake_system_processor MATCHES "x.*64")
set(target_architecture "X86")
elseif (cmake_system_processor MATCHES "ppc64")
set(target_architecture "PowerPC")
else()
message(FATAL_ERROR
"Could not configure LLVM for the target system processor '${CMAKE_SYSTEM_PROCESSOR}'.")
endif()
superbuild_add_project(llvm
CAN_USE_SYSTEM
DEPENDS python cxx11
......@@ -17,8 +31,7 @@ superbuild_add_project(llvm
-DLLVM_ENABLE_RTTI=ON
-DLLVM_INSTALL_UTILS=ON
-DLLVM_ENABLE_LIBXML2=OFF
-DLLVM_TARGETS_TO_BUILD:STRING=X86 # FIXME: When using this on PowerPC,
# this will need to be updated.
-DLLVM_TARGETS_TO_BUILD:STRING=${target_architecture}
-DPYTHON_EXECUTABLE=${superbuild_python_executable})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment