[llvm] r331423 - [Support] Support building LLVM for Fuchsia
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Wed May 2 18:38:49 PDT 2018
Author: phosek
Date: Wed May 2 18:38:49 2018
New Revision: 331423
URL: http://llvm.org/viewvc/llvm-project?rev=331423&view=rev
Log:
[Support] Support building LLVM for Fuchsia
These are necessary changes to support building LLVM for Fuchsia.
While these are not sufficient to run on Fuchsia, they are still
useful when cross-compiling LLVM libraries and runtimes for Fuchsia.
Differential Revision: https://reviews.llvm.org/D46345
Modified:
llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
llvm/trunk/lib/Support/Unix/Path.inc
Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=331423&r1=331422&r2=331423&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Wed May 2 18:38:49 2018
@@ -115,7 +115,7 @@ if(WIN32)
set(LLVM_ON_UNIX 0)
endif(CYGWIN)
else(WIN32)
- if(UNIX)
+ if(FUCHSIA OR UNIX)
set(LLVM_ON_WIN32 0)
set(LLVM_ON_UNIX 1)
if(APPLE OR ${CMAKE_SYSTEM_NAME} MATCHES "AIX")
@@ -123,9 +123,9 @@ else(WIN32)
else()
set(LLVM_HAVE_LINK_VERSION_SCRIPT 1)
endif()
- else(UNIX)
+ else(FUCHSIA OR UNIX)
MESSAGE(SEND_ERROR "Unable to determine platform")
- endif(UNIX)
+ endif(FUCHSIA OR UNIX)
endif(WIN32)
set(EXEEXT ${CMAKE_EXECUTABLE_SUFFIX})
Modified: llvm/trunk/lib/Support/Unix/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Path.inc?rev=331423&r1=331422&r2=331423&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Path.inc (original)
+++ llvm/trunk/lib/Support/Unix/Path.inc Wed May 2 18:38:49 2018
@@ -365,6 +365,9 @@ static bool is_local_impl(struct STATVFS
#elif defined(__CYGWIN__)
// Cygwin doesn't expose this information; would need to use Win32 API.
return false;
+#elif defined(__Fuchsia__)
+ // Fuchsia doesn't yet support remote filesystem mounts.
+ return true;
#elif defined(__sun)
// statvfs::f_basetype contains a null-terminated FSType name of the mounted target
StringRef fstype(Vfs.f_basetype);
More information about the llvm-commits
mailing list