Comments (9)
@nickdesaulniers you might be interested in https://github.com/dzbarsky/static-clang/ (Also, hi, long time no see!)
from tc-build.
This is difficult to be done purely in llvm-project's CMake build system. Some musl linked external libraries are needed: libtinfo, libz, libstdc++/libc++. One will need a musl targeting toolchain to build these external libraries, then build a clang+libc++ (the built clang produces object files linking against the build musl libc++), finally re-build clang with the libc++ using clang.
musl-cross-make can build a GCC toolchain, but the author does not have extra bandwidth to support Clang.
@pattop's https://www.openwall.com/lists/musl/2021/01/11/1 may be helpful.
from tc-build.
we do cross build clang in Yocto/OE world to run on musl targets, I wonder if same clang can be targeted at x86_64 and used
from tc-build.
The current state of my musl-cross-make clang support is here https://github.com/apexrtos/musl-cross-make/tree/clang. It includes some patches for my embedded work, but the native x86_64 toolchain should be fully functional.
make COMPILER=clang
make COMPILER=clang OUTPUT=/tmp/musl-clang install
should be all you need to do to get a working musl-clang toolchain with some arm targets and x86_64. I've never tried to build clang with this though.
@MaskRay if you have time it would be great if you could review my build process & patches. Ideally it would be merged into musl-cross-make upstream but that doesn't look to be possible at the moment. There's enough complexity here that I think it's worth having one recipe for people to use.
from tc-build.
@compnerd has something hacked up that seems to be working:
https://gist.github.com/compnerd/ebbc625a359d1d3e292e1fd2007ecb52
from tc-build.
I'm working through trying to get this working in https://github.com/ClangBuiltLinux/llvm-musl-bootstrap/pull/1/files.
from tc-build.
What @sternenseemann did in #150 (comment) using Musl, so we have static linking and musl link both working.
from tc-build.
yo @dzbarsky I bookmarked that shit yesterday
from tc-build.
Nice, I fixed/cleaned up a few things and tagged a 17.0.1 release. It works for my purposes but if you see something off, let me know
from tc-build.
Related Issues (20)
- [Question] Does build-llvm.py need an update for clang-14? HOT 3
- question: how to find out why a linking error happens? HOT 2
- [BOLT] Minimum hardware requirements? HOT 10
- download llvm from tarball's rather than shallow clone? HOT 1
- Ability to specify llvm sha HOT 1
- Building kernels: Show Linux version (when passing -L option) HOT 3
- Use sccache to speed up builds HOT 5
- Bump binutils to version 2.39
- Good revision broken on arm64 HOT 4
- Display total build-time HOT 6
- build-binutils.py: Do not build texinfo docs HOT 3
- Print total disc-usage in MiB HOT 4
- Alpine/Musl segfault when building BOLT in stage 3 HOT 7
- ld.gold and ld.bfd HOT 1
- ld.bfd ld.gold missing and build_binutils problem HOT 22
- build-binutils.py: don't assume -mtune == -march HOT 2
- Could not find LLVM_VERSION_MAJOR in CMakeLists.txt HOT 3
- objtool warning HOT 1
- Cross toolchain question HOT 6
- BOLT's stage system requirements HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tc-build.