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

Apple Silicon support #21

Open
tmcdonell opened this issue Dec 8, 2021 · 1 comment
Open

Apple Silicon support #21

tmcdonell opened this issue Dec 8, 2021 · 1 comment

Comments

@tmcdonell
Copy link
Member

Update formula to support building on apple silicon. Not sure how far back we can go for this...

@bucanero
Copy link

bucanero commented Dec 9, 2021

I was able to manually build llvm-10 on M1 from sources. My build is not the "full" build, but I only needed it as a cross-compiler to generate PS4 (x86) code, and it worked just fine.

Just for the record, here's how I built it: (cmake and ninja are required, you can install them with brew install cmake ninja)

Download and unpack the v10.0.1 source files:
https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/llvm-project-10.0.1.tar.xz

create a folder for this build

cd llvm-project-10.0.1
mkdir build
cd build

call cmake to generate the required build scripts:

cmake -G Ninja \
    -DDEFAULT_SYSROOT="$(xcrun --show-sdk-path)" \
    -DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi;lld;clang-tools-extra" \
    -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release ../llvm

compile:

ninja clang
ninja cxx
ninja lld
ninja llvm-ar

when finished, you'll have the llvm 10 native binaries in the bin folder.
You can copy the build folder to /usr/local/opt/llvm and use it as needed. (in my case, with the Open Orbis SDK)

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

No branches or pull requests

2 participants