[PATCH] D135578: [CMake] Add option LLVM_FORCE_CREATE_SYMLINKS

Tobias Hieta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 10 06:38:25 PDT 2022


thieta created this revision.
thieta added reviewers: phosek, rnk, mstorsjo, nikic.
Herald added a project: All.
thieta requested review of this revision.
Herald added a project: LLVM.

On Windows we don't create symlinks for the binaries (clang++, clang-cl)
since the support requires special setup (group policy settings and
you need to know exactly our distribution story). But if you know
about these things and have a controlled environment there is a lot
of storage to be saved, so let's add a manual opt-in for using symlinks
on Windows with LLVM_FORCE_CREATE_SYMLINKS=ON.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D135578

Files:
  llvm/cmake/modules/AddLLVM.cmake


Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/cmake/modules/AddLLVM.cmake
@@ -2127,7 +2127,9 @@
     endif()
   endif()
 
-  if(CMAKE_HOST_UNIX)
+  option(LLVM_FORCE_CREATE_SYMLINKS "Force the creation of symlinks even on Windows" OFF)
+
+  if(CMAKE_HOST_UNIX OR LLVM_FORCE_CREATE_SYMLINKS)
     set(LLVM_LINK_OR_COPY create_symlink)
   else()
     set(LLVM_LINK_OR_COPY copy)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135578.466485.patch
Type: text/x-patch
Size: 485 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221010/824eec08/attachment.bin>


More information about the llvm-commits mailing list