[PATCH] D114764: Use `thin` that starts with lowercase letter. - `Thin` gives an error when following https://clang.llvm.org/docs/ThinLTO.html#clang-bootstrap, and `thin` works.

Mingming Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 29 18:37:32 PST 2021

luna added a comment.

In D114764#3160204 <https://reviews.llvm.org/D114764#3160204>, @tejohnson wrote:

> There are some other docs that also use "Thin" (and "Full", etc). I see my own script uses "THIN" for this cmake variable. Looks like we convert to uppercase so I wouldn't think it should matter:
> See llvm/cmake/modules/HandleLLVMOptions.cmake:30
> Can you clarify what problem you are encountering? I'm not sure I understand the reference to WholeProgramDevirt.cpp in the title.

Thanks for pointing this out! The title should be https://clang.llvm.org/docs/ThinLTO.html#clang-bootstrap (WholeProgramDevirt should be from stale paste board).

I made a mistake in the command; re-run the command works for me [1]; previously I remember seeing  `flto` 'Thin' in the terminal, so must have mixed the `clang` cmmand and `cmake` command.

Going to revert this.

[1] cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_SPHINX=true -DLLVM_USE_LINKER=lld -DLLVM_CCACHE_BUILD=On -DSPHINX_OUTPUT_HTML=true -DLLVM_ENABLE_PROJECTS='clang;compiler-rt;lld' /path/to/llvm-project/llvm -DLLVM_BINUTILS_INCDIR=/path/to/binutils/include -DLLVM_ENABLE_LTO=Thin -DLLVM_PARALLEL_LINK_JOBS=1 -DCMAKE_C_COMPILER=/usr/local/bin/clang -DCMAKE_CXX_COMPILER=/usr/local/bin/clang++ -DCMAKE_RANLIB=/usr/local/bin/llvm-ranlib -DCMAKE_AR=/usr/local/bin/llvm-ar

  rG LLVM Github Monorepo



More information about the cfe-commits mailing list