Maybe the failure you got can be solved / workedaround also by using llvm-config ?
]]>I'm trying to compile the LLVM-embedded-toolchain-for-Arm. Compilation fails due to CMake not recognizing my system as any known platform:
CMake Error at /home/alessandro/tesi/LLVM-embedded-toolchain-for-Arm/repos/llvm-project/llvm/cmake/modules/HandleLLVMOptions.cmake:150 (MESSAGE):
Unable to determine platform
Call Stack (most recent call first):
CMakeLists.txt:157 (include)
The referenced file contain:
if(WIN32)
set(LLVM_HAVE_LINK_VERSION_SCRIPT 0)
if(CYGWIN)
set(LLVM_ON_WIN32 0)
set(LLVM_ON_UNIX 1)
else(CYGWIN)
set(LLVM_ON_WIN32 1)
set(LLVM_ON_UNIX 0)
endif(CYGWIN)
else(WIN32)
if(FUCHSIA OR UNIX)
set(LLVM_ON_WIN32 0)
set(LLVM_ON_UNIX 1)
if(APPLE OR ${CMAKE_SYSTEM_NAME} MATCHES "AIX")
set(LLVM_HAVE_LINK_VERSION_SCRIPT 0)
else()
set(LLVM_HAVE_LINK_VERSION_SCRIPT 1)
endif()
else(FUCHSIA OR UNIX)
MESSAGE(SEND_ERROR "Unable to determine platform") // <----- HERE
endif(FUCHSIA OR UNIX)
endif(WIN32)
Now I tried invoking CMake with `-DUNIX=True` but with no success. Adding at the top of the root CMakeLists.txt the lines:
message(STATUS "Using LLVM on: ${CMAKE_SYSTEM_NAME}")
set(UNIX TRUE)
prints blank for the first, and doesn't make UNIX show up when I invoke CMake with `-LH`. Moreover, compilation still doesn't work.
What am I doing wrong? Is this an issue of Arch, of CMake, of my system, of the CMakeLists.txt...?
Thanks!
]]>