Skip to content

release: build nessarary executable with 5 core compoent with -DLLVM_INSTALL_UTILS=OFF#17

Merged
cpunion merged 1 commit into
goplus:mainfrom
luoliwoshang:rm/rmunse-flag
Sep 5, 2025
Merged

release: build nessarary executable with 5 core compoent with -DLLVM_INSTALL_UTILS=OFF#17
cpunion merged 1 commit into
goplus:mainfrom
luoliwoshang:rm/rmunse-flag

Conversation

@luoliwoshang
Copy link
Copy Markdown
Member

@luoliwoshang luoliwoshang commented Sep 1, 2025

part of #12

Optimize LLVM Build Time by Targeting Essential Tools Only

Problem:
Current build compiles all 123 LLVM tools, taking >2 hours(macos x86) and often exceeding CI/Homebrew timeout limits.

Solution:
Build only the 5 essential tools required by LLGO: clang, lld, llvm-ar, llvm-nm, and llvm-config. This approach is inspired by TinyGo's optimization strategy.

Impact:

  • Full functionality preserved: All LLGo requirements met
  • Dynamic library support: libLLVM.dylib automatically built with these targets
  • CI/Homebrew compatible: Fits within timeout constraints

LLGO only requires libLLVM.dylib for CGO bindings, making the other 118 tools unnecessary for core functionality.

@luoliwoshang luoliwoshang marked this pull request as draft September 1, 2025 05:50
@luoliwoshang luoliwoshang changed the title -DLLVM_INSTALL_UTILS=OFF release: build nessarary executable with 5 core compoent with -DLLVM_INSTALL_UTILS=OFF Sep 1, 2025
@luoliwoshang luoliwoshang marked this pull request as ready for review September 1, 2025 07:33
@cpunion cpunion merged commit db584b6 into goplus:main Sep 5, 2025
6 checks passed
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