[PATCH] D60812: Don't error on CMAKE_SYSTEM_NAME=Wasi

Dan Gohman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 14:25:33 PDT 2019


sunfish added inline comments.


================
Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:129
     endif()
   else(FUCHSIA OR UNIX)
+    if(${CMAKE_SYSTEM_NAME} MATCHES "Wasi")
----------------
Ericson2314 wrote:
> matthewbauer wrote:
> > matthewbauer wrote:
> > > sunfish wrote:
> > > > I don't know a lot about CMake, but would be better to add a predicate for `WASI` so that we can change these `FUCHSIA OR UNIX` conditions into `FUCHSIA OR UNIX OR WASI` conditions?
> > > Maybe, although we'd have to make sure that LLVM_ON_UNIX and LLVM_HAVE_LINK_VERSION_SCRIPT are okay to set above. I think LLVM_HAVE_LINK_VERSION_SCRIPT is fine (lld should allow it) but not sure about LLVM_ON_UNIX.
> > > 
> > > We aren't really using this right now although at some point someone could port clang and llvm to run on Wasi I suppose. In the libcxxabi case LLVM_ON_UNIX might not be needed at all. We aren't actually building LLVM for Wasm, just using it for some headers.
> > LLVM_ON_UNIX isn't needed at all for libcxxabi. Building LLVM itself is a different story though.
> https://github.com/Kitware/CMake/blob/master/Modules/Platform/Fuchsia.cmake this is where `FUCHSIA` comes from. I agree `WASI` should be defined upstream so it can be used here.
As an updated here, I've now submitted https://gitlab.kitware.com/cmake/cmake/merge_requests/3261.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60812/new/

https://reviews.llvm.org/D60812





More information about the llvm-commits mailing list