Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build llvm with LLVM_INSTALL_TOOLCHAIN_ONLY #364

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

sbc100
Copy link
Member

@sbc100 sbc100 commented Dec 11, 2023

This means that make install then only installs things that are meant to be part of the public facing toolchain.

See https://llvm.org/docs/BuildingADistribution.html#difference-between-install-and-install-distribution

The list binaries that get installed now differ as follows:

--- old
+++ new
@@ -1,34 +1,72 @@
+addr2line
+amdgpu-arch
+analyze-build
 ar
 c++filt
 clang
 clang++
 clang-17
 clang-apply-replacements
+clang-change-namespace
+clang-check
 clang-cl
 clang-cpp
+clangd
+clang-doc
+clang-extdef-mapping
 clang-format
+clang-include-cleaner
+clang-include-fixer
+clang-linker-wrapper
+clang-move
+clang-offload-bundler
+clang-offload-packager
+clang-pseudo
+clang-query
+clang-refactor
+clang-rename
+clang-reorder-fields
+clang-scan-deps
 clang-tidy
+diagtool
+find-all-symbols
 git-clang-format
+hmaptool
+intercept-build
 ld64.lld
 ld.lld
 lld
 lld-link
 llvm-ar
+llvm-cov
 llvm-cxxfilt
-llvm-dwarfdump
-llvm-mc
+llvm-dwp
+llvm-lib
+llvm-ml
 llvm-nm
 llvm-objcopy
 llvm-objdump
+llvm-pdbutil
+llvm-profdata
 llvm-ranlib
+llvm-rc
+llvm-readobj
 llvm-size
 llvm-strings
 llvm-strip
+llvm-symbolizer
+modularize
 nm
+nvptx-arch
 objcopy
 objdump
+pp-trace
 ranlib
+readelf
 run-clang-tidy
+scan-build
+scan-build-py
+scan-view
 size
 strings
 strip

This means that `make install` then only installs things that are meant
to be part of the public facing toolchain.

See https://llvm.org/docs/BuildingADistribution.html#difference-between-install-and-install-distribution

The list binaries that get installed now differ as follows:

```
--- old
+++ new
@@ -1,34 +1,72 @@
+addr2line
+amdgpu-arch
+analyze-build
 ar
 c++filt
 clang
 clang++
 clang-17
 clang-apply-replacements
+clang-change-namespace
+clang-check
 clang-cl
 clang-cpp
+clangd
+clang-doc
+clang-extdef-mapping
 clang-format
+clang-include-cleaner
+clang-include-fixer
+clang-linker-wrapper
+clang-move
+clang-offload-bundler
+clang-offload-packager
+clang-pseudo
+clang-query
+clang-refactor
+clang-rename
+clang-reorder-fields
+clang-scan-deps
 clang-tidy
+diagtool
+find-all-symbols
 git-clang-format
+hmaptool
+intercept-build
 ld64.lld
 ld.lld
 lld
 lld-link
 llvm-ar
+llvm-cov
 llvm-cxxfilt
-llvm-dwarfdump
-llvm-mc
+llvm-dwp
+llvm-lib
+llvm-ml
 llvm-nm
 llvm-objcopy
 llvm-objdump
+llvm-pdbutil
+llvm-profdata
 llvm-ranlib
+llvm-rc
+llvm-readobj
 llvm-size
 llvm-strings
 llvm-strip
+llvm-symbolizer
+modularize
 nm
+nvptx-arch
 objcopy
 objdump
+pp-trace
 ranlib
+readelf
 run-clang-tidy
+scan-build
+scan-build-py
+scan-view
 size
 strings
 strip
```
@sunfishcode
Copy link
Member

The loss of llvm-dwarfdump seems surprising; do you know why isn't that included, when things like llvm-objdump are?

@sbc100
Copy link
Member Author

sbc100 commented Dec 11, 2023

The loss of llvm-dwarfdump seems surprising; do you know why isn't that included, when things like llvm-objdump are?

The list seems to be hardcoded here: https://github.com/llvm/llvm-project/blob/29ee66f4a0967e43a035f147c960743c7b640f2f/llvm/cmake/modules/AddLLVM.cmake#L1306-L1340

I'm not sure why dwarfdump is not on this list.. perhaps its viewed as an internal debugging tool? We could make and exception and add it explicitly? Or ask upstream why its not there already?

@sunfishcode
Copy link
Member

Would it be difficult to add back in here? Asking upstream may be worth doing, but it'd be nice if we could do something easy for now.

@sbc100
Copy link
Member Author

sbc100 commented Dec 12, 2023

Would it be difficult to add back in here? Asking upstream may be worth doing, but it'd be nice if we could do something easy for now.

Ah.. sadly I can't do make install install-llvm-dwarfdump since LLVM_INSTALL_TOOLCHAIN_ONLY mean that second target simply doesn't exist.

Do you think wasi-sdk should include that binary for some reason?

@sbc100 sbc100 marked this pull request as draft December 12, 2023 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants