distribution-scripts
distribution-scripts copied to clipboard
[WIP] Explicitly specify target for Darwin Intel crystal build
By default uses the target of the system where the script is executed. If run darwin build on MacOS M1 laptop, it generates 2 arm binaries. And command lito returns error that both files have same arch.
Reproduction of the problem:
$ llvm-config --host-target
arm64-apple-darwin23.0.0
$ make crystal stats=true release=true
Using /usr/local/bin/llvm-config [version= 15.0.7]
CRYSTAL_CONFIG_BUILD_COMMIT="1f592eca6" CRYSTAL_CONFIG_PATH='$ORIGIN/../share/crystal/src' SOURCE_DATE_EPOCH="1699639716" CRYSTAL_CONFIG_LIBRARY_PATH= ./bin/crystal build --no-debug -D strict_multi_assign ....
$ file .../crystal/embedded/bin/crystal
.../crystal/embedded/bin/crystal: Mach-O 64-bit executable arm64
Problems
Currently I found that make crystal target=x86_64-apple-darwin release=true from crystal repo is not working for me. Looking for way to build dependencies in correct arch.
Relies on changes from #267 and #266