This is an archive of the discontinued LLVM Phabricator instance.

[lld][CMake] Add a warning about the Standalone build being deprecated
AbandonedPublic

Authored by MaskRay on Feb 9 2022, 3:18 PM.

Details

Reviewers
mstorsjo
peter.smith
tstellar
Group Reviewers
Restricted Project
Summary

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), deprecate and remove the build
mode.

Diff Detail

Event Timeline

MaskRay requested review of this revision.Feb 9 2022, 3:18 PM
MaskRay created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 9 2022, 3:18 PM

Why stop there? Just keep it simple and fail the build.

Why stop there? Just keep it simple and fail the build.

Do you suggest message(FATAL_ERROR ...)? Honestly I don't know whether anybody has success with the standalone build...
If it is already broken enough, then perhaps we can just go with FATAL_ERROR.

My goal is to use the same method for compiling llvm, clang, and lld as package maintainers, so that we don't get any "surprises" when someone packages our application using system llvm, lld, clang packages. I don't really care which way is the correct way to compile the software but the existence of multiple ways to do it creates problems for me.

My goal is to use the same method for compiling llvm, clang, and lld as package maintainers, so that we don't get any "surprises" when someone packages our application using system llvm, lld, clang packages. I don't really care which way is the correct way to compile the software but the existence of multiple ways to do it creates problems for me.

Your bug report demonstrates that you are(or were?) a standalone build user. For the unknown downstream standalone users, I want to be conservative and not disrupt their workflow too much.
Therefore I consider a warning for release/14.x.

For the main branch I'll use a FATAL_ERROR. I'm preparing a similar patch for Clang as I think the standalone build is also broken there.

-DLLVM_ENABLE_RUNTIMES is for 'libcxx;libcxxabi;libunwind;compiler-rt'. Every else top-level project uses LLVM_ENABLE_PROJECTS.

Sounds good to me

tstellar requested changes to this revision.Feb 9 2022, 7:00 PM
tstellar added a subscriber: tstellar.

Same comments as D119383, I would like to keep this supported if possible.

This revision now requires changes to proceed.Feb 9 2022, 7:00 PM

Same comments as D119383, I would like to keep this supported if possible.

I created https://discourse.llvm.org/t/standalone-build-for-clang-lld-fix-or-remove/59977

Sounds like you're trying hard to make me step down from contributing to LLVM anymore.

Sounds like you're trying hard to make me step down from contributing to LLVM anymore.

Is the comment to me or to someone else? The comment may be perceived as confusing...

Sounds like you're trying hard to make me step down from contributing to LLVM anymore.

It is clear that you feel strongly about this topic, but are you in favor of standalone builds or against?

MaskRay abandoned this revision.Sep 13 2022, 9:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 13 2022, 9:34 PM
Herald added a subscriber: StephenFan. · View Herald Transcript