Page MenuHomePhabricator

[docs][cmake] document LLVM_ENABLE_PLUGINS
AbandonedPublic

Authored by nickdesaulniers on May 21 2019, 2:07 PM.

Details

Summary

Looks like LLVM_ENABLE_PLUGINS was created in r212315.

Some additional info on plugins can be found:

r260262 seems to indicate that LLVM_ENABLE_PLUGINS default value is
platform specific.

pr/41970

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMay 21 2019, 2:07 PM
srhines added inline comments.May 21 2019, 2:11 PM
llvm/docs/CMake.rst
602

LLVM

nickdesaulniers marked an inline comment as done.May 21 2019, 2:17 PM
nickdesaulniers added inline comments.
llvm/docs/CMake.rst
602

It was intentional; I think usually people try to load plugins through clang a la https://clang.llvm.org/docs/ClangPlugins.html.

I can change it to LLVM if you feel strongly about this. WDYT?

Also, should I maybe mention LLVM_ENABLE_PLUGINS on that page (and the LLVMGold one)?

srhines added inline comments.May 21 2019, 2:21 PM
llvm/docs/CMake.rst
602

Sorry, I forget that phabricator doesn't do intra-line highlights, and thus my message was misinterpreted. I wanted a fix for the capitalization of LLVM, since it isn't lowercase in this doc.

As far as the ClangPlugins.html page, I think that is generally user docs, so shouldn't be concerned with building your own LLVM distribution.

  • capitalize LLVM
nickdesaulniers marked 2 inline comments as done.May 21 2019, 2:26 PM
nickdesaulniers added a subscriber: nathanchance.
srhines accepted this revision.May 21 2019, 2:33 PM
This revision is now accepted and ready to land.May 21 2019, 2:33 PM

Is there a point to adding this if it isn't a user selectable option? LLVM_ENABLE_PLUGINS doesn't have an option in any cmake files, it is only ever set.

nickdesaulniers abandoned this revision.May 21 2019, 3:14 PM

Is there a point to adding this if it isn't a user selectable option? LLVM_ENABLE_PLUGINS doesn't have an option in any cmake files, it is only ever set.

Huh, weird...

$ cd llvm/build
$ rm -rf *
$ cmake .. -DCMAKE_BUILD_TYPE=Release -G Ninja -DLLVM_ENABLE_LLD=ON -DLLVM_ENABLE_PROJECTS="clang;lld" -DLLVM_TARGETS_TO_BUILD="AArch64;ARM;X86" -DLLVM_ENABLE_PLUGINS="ON"
$ ninja check-llvm-bugpoint
...
[0/1] Running lit suite /android0/llvm-project/llvm/test/BugPoint
Testing Time: 0.11s
  Unsupported Tests  : 10

$ cmake .. -DCMAKE_BUILD_TYPE=Release -G Ninja -DCMAKE_C_COMPILER=/android1/android-master/prebuilts/clang/host/linux-x86/clang-r353983c/bin/clang -DCMAKE_CXX_COMPILER=/android1/android-master/prebuilts/clang/host/linux-x86/clang-r353983c/bin/clang++ -DLLVM_ENABLE_LLD=ON -DLLVM_ENABLE_PROJECTS="clang;lld" -DLLVM_TARGETS_TO_BUILD="AArch64;ARM;X86" -DLLVM_BUILD_LLVM_DYLIB="ON"
$ ninja check-llvm-bugpoint
[12/13] Running lit suite /android0/llvm-project/llvm/test/BugPoint
Testing Time: 1.24s
  Expected Passes    : 10

Guess I should have known that: https://github.com/ClangBuiltLinux/tc-build/commit/f0a88523bcfd60f649536a07f678e85ef31b4a2d. Thanks @nathanchance !