[PATCH] D72951: [CMake] Handle 'Generic' system in HandleLLVMOptions.cmake
James Nagurne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 17 12:47:40 PST 2020
JamesNagurne created this revision.
Herald added subscribers: llvm-commits, kristof.beyls, mgorny.
Herald added a project: LLVM.
This configuration file is included in libcxx/libcxxabi/libunwind build
systems, which should be able to be built for embedded ARM, which is
considered a 'Generic' system (CMAKE_SYSTEM_NAME).
However, this file errors out when neither WIN32, UNIX, nor FUCHSIA is set.
I've defined the generic system as being neither WIN32, UNIX, and doesn't
have the shared library support for a link version script. Looking through
the applications of the variables defined, I couldn't see any conflicts
in the aforementioned projects.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D72951
Files:
llvm/cmake/modules/HandleLLVMOptions.cmake
Index: llvm/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/cmake/modules/HandleLLVMOptions.cmake
+++ llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -107,19 +107,21 @@
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")
- endif(FUCHSIA OR UNIX)
-endif(WIN32)
+elseif(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()
+elseif(CMAKE_SYSTEM_NAME STREQUAL "Generic")
+ set(LLVM_ON_WIN32 0)
+ set(LLVM_ON_UNIX 0)
+ set(LLVM_HAVE_LINK_VERSION_SCRIPT 0)
+else()
+ MESSAGE(SEND_ERROR "Unable to determine platform")
+endif()
set(EXEEXT ${CMAKE_EXECUTABLE_SUFFIX})
set(LTDL_SHLIB_EXT ${CMAKE_SHARED_LIBRARY_SUFFIX})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72951.238863.patch
Type: text/x-patch
Size: 1202 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200117/e6ea36e1/attachment.bin>
More information about the llvm-commits
mailing list