tpoechtrager / osxcross

Mac OS X cross toolchain for Linux, FreeBSD, OpenBSD and Android (Termux)
GNU General Public License v2.0
2.81k stars 320 forks source link

Update build_clang.sh to Build Latest LLVM Releases #336

Closed justdan96 closed 1 year ago

justdan96 commented 2 years ago

This PR updates the build_clang.sh script to build Clang releases from Apple or LLVM Org GitHub repos. I've successfully tested with official LLVM and Apple sources, which can now be switched through the GITPROJECT variable.

I've also added comments here and there to help with maintainability.

justdan96 commented 2 years ago

I've tested this a few times, please review and let me know.

leolara commented 2 years ago

@justdan96 so I run the script to compile the latest Apple Clang 12 compiler. At the end got:

Done!

cd into '[...]/osxcross/build/' and type 'make install' to install clang/llvm to '/usr/local'

but there is no Makefile in that directory

leolara commented 2 years ago

It actually should be:

cd build/build_stage && make install

justdan96 commented 2 years ago

Ah, looks like line 196 needs to be corrected.

Edit: this has now been fixed.