It requires CMake. Make fails somewhere in the step where we run a Lua script to unpack the .a files, and I don't currently have time (or interest) to debug it.
It requires passing -DCMAKE_C_COMPILER=$(which CC), because apparently CMake tries to auto-detect the XCode installation, and LuaJIT can't build with that compiler. I've got into a VM to confirm this behavior but don't have time to debug it.
It still requires setting INCLUDE_PATH="$(xcrun --sdk macosx --show-sdk-path)/usr/include". I thought this was going to fixed by this patch but apparently not. This may indicate we're still not getting all of the Clang initialization right.
It includes a workaround for https://github.com/LuaJIT/LuaJIT/issues/575, which at the moment means we bump the deployment target to 10.7. Shouldn't matter for most users but if you want to use a LuaJIT 2.1 build from Git, this is now required.
It's been a long road, but I finally have Terra building and passing all tests on macOS Mojave without the workaround suggested in https://github.com/terralang/terra/issues/365.
Caveats:
.a
files, and I don't currently have time (or interest) to debug it.-DCMAKE_C_COMPILER=$(which CC)
, because apparently CMake tries to auto-detect the XCode installation, and LuaJIT can't build with that compiler. I've got into a VM to confirm this behavior but don't have time to debug it.INCLUDE_PATH="$(xcrun --sdk macosx --show-sdk-path)/usr/include"
. I thought this was going to fixed by this patch but apparently not. This may indicate we're still not getting all of the Clang initialization right.