[PATCH] D119380: [lld][CMake] Add a warning about the Standalone build being deprecated

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 9 15:18:38 PST 2022


MaskRay created this revision.
MaskRay added reviewers: lld-macho, mstorsjo, peter.smith.
MaskRay requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

`cmake -Hlld -B/path/to/build` currently fails with

  CMake Error at CMakeLists.txt:89 (include):
    include could not find requested file:
  
      GetErrcMessages
  ...
  CMake Error at cmake/modules/AddLLD.cmake:17 (get_target_export_arg):
    Unknown CMake command "get_target_export_arg".
  Call Stack (most recent call first):
    Common/CMakeLists.txt:29 (add_lld_library)

In the past there has been other issues like
https://github.com/llvm/llvm-project/issues/48572.

Keeping the Standalone build working is now quite a bit of hassle and to
the best of my knowledge not any active contributor typically does. Let's
follow libc++/libc++abi/libunwind (D119341 <https://reviews.llvm.org/D119341>), deprecate and remove the build
mode.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119380

Files:
  lld/CMakeLists.txt


Index: lld/CMakeLists.txt
===================================================================
--- lld/CMakeLists.txt
+++ lld/CMakeLists.txt
@@ -5,6 +5,8 @@
 if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
   project(lld)
   set(LLD_BUILT_STANDALONE TRUE)
+  message(WARNING "The Standalone build is deprecated in this release. Please
+    use -DLLVM_ENABLE_PROJECTS='...;lld;...' to build lld.")
 endif()
 
 # Must go below project(..)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119380.407318.patch
Type: text/x-patch
Size: 443 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220209/dce455be/attachment.bin>


More information about the llvm-commits mailing list