Skip to content

Commit 900c71f

Browse files
[𝘀𝗽𝗿] initial version
Created using spr 1.3.6
1 parent 4ab8dab commit 900c71f

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

llvm/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -879,13 +879,6 @@ option (LLVM_ENABLE_OCAMLDOC "Build OCaml bindings documentation." ON)
879879
option (LLVM_ENABLE_BINDINGS "Build bindings." ON)
880880
option (LLVM_ENABLE_TELEMETRY "Enable the telemetry library. If set to OFF, library cannot be enabled after build (eg., at runtime)" ON)
881881

882-
set(LLVM_ENABLE_ONDISK_CAS_default ON)
883-
if(CMAKE_SIZEOF_VOID_P LESS 8 OR "${CMAKE_SYSTEM_NAME}" MATCHES SunOS)
884-
# Build OnDiskCAS by default only on 64 bit machine that is not Solaris.
885-
set(LLVM_ENABLE_ONDISK_CAS_default OFF)
886-
endif()
887-
option(LLVM_ENABLE_ONDISK_CAS "Build OnDiskCAS." ${LLVM_ENABLE_ONDISK_CAS_default})
888-
889882
set(LLVM_INSTALL_DOXYGEN_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/llvm/doxygen-html"
890883
CACHE STRING "Doxygen-generated HTML documentation install directory")
891884
set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/llvm/ocaml-html"

llvm/cmake/modules/HandleLLVMOptions.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,3 +1479,11 @@ if(LLVM_ENABLE_LLVM_LIBC)
14791479
message(WARNING "Unable to link against LLVM libc. LLVM will be built without linking against the LLVM libc overlay.")
14801480
endif()
14811481
endif()
1482+
1483+
check_symbol_exists(flock "sys/file.h" HAVE_FLOCK)
1484+
set(LLVM_ENABLE_ONDISK_CAS_default OFF)
1485+
if(HAVE_FLOCK OR LLVM_ON_WIN32)
1486+
# LLVM ONDisk CAS currently requires flock on Unix.
1487+
set(LLVM_ENABLE_ONDISK_CAS_default ON)
1488+
endif()
1489+
option(LLVM_ENABLE_ONDISK_CAS "Build OnDiskCAS." ${LLVM_ENABLE_ONDISK_CAS_default})

0 commit comments

Comments
 (0)