From 3d31bb4498725813fee4a0201a2873a6c24afaf1 Mon Sep 17 00:00:00 2001 From: Techcable Date: Mon, 6 Jun 2022 02:32:06 -0700 Subject: [PATCH] Static linking LLVM doesn't work on M1 Macs, default works better (See here: https://gist.github.com/Techcable/47454d794b25d05a59bac557ec4a13ee) --- Troubleshooting-Build-Issues.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Troubleshooting-Build-Issues.md b/Troubleshooting-Build-Issues.md index 9f488f7..5a0dc14 100644 --- a/Troubleshooting-Build-Issues.md +++ b/Troubleshooting-Build-Issues.md @@ -81,6 +81,13 @@ rm -rf CMakeFiles Then try running the cmake command again. +### M1 Macs (ARM) +On M1 Macs, static linking with homebrew LLVM does not seem to work. Omit `-DZIG_STATIC_LLVM=on` from the above command. + +``` +cmake .. -DCMAKE_PREFIX_PATH=$(brew --prefix llvm) +``` + ## High Memory Requirements If you are failing at the last stage ```[99%] Building self-hosted component /PATHTOZIG/zig/build/zig1.o```, make sure you have enough memory, as the process can take more than 10GiB of memory.