This is an archive of the discontinued LLVM Phabricator instance.

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.
AbandonedPublic

Authored by mingmingl on Nov 29 2021, 6:11 PM.

Details

Reviewers
tejohnson
Summary

Fix a typo.

Diff Detail

Event Timeline

mingmingl created this revision.Nov 29 2021, 6:11 PM
mingmingl requested review of this revision.Nov 29 2021, 6:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 29 2021, 6:11 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

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.

mingmingl retitled this revision from Use `thin` that starts with lowercase letter. - `Thin` gives an error when following lib/Transforms/IPO/WholeProgramDevirt.cpp, and `thin` works. to 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..Nov 29 2021, 6:24 PM

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

In D114764#3160212, @luna 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.

Ah ok, glad that works now. Yes, it is case sensitive lowercase for the clang option, but not for the cmake variable.

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

mingmingl abandoned this revision.Dec 2 2021, 1:31 PM