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

[WIP] Explicitly specify target for Darwin Intel crystal build #265

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

miry
Copy link
Contributor

@miry miry commented Nov 10, 2023

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

@miry miry changed the title Explicitly specify target for Darwin Intel build [WIP] Explicitly specify target for Darwin Intel build Nov 10, 2023
@miry miry force-pushed the darwin-build-arm64 branch 4 times, most recently from 8e5c037 to dbcc79a Compare November 12, 2023 12:16
@miry miry changed the title [WIP] Explicitly specify target for Darwin Intel build [WIP] Explicitly specify target for Darwin Intel crystal build Nov 12, 2023
@miry miry mentioned this pull request Nov 12, 2023
8 tasks
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
```
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

Successfully merging this pull request may close these issues.

None yet

1 participant