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

Commits on Jan 4, 2024

  1. Explicitly specify target for Darwin Intel 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
    ```
    miry committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    afb4f9a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e5a5658 View commit details
    Browse the repository at this point in the history
  3. cherry pick crystal-lang#266

    miry committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    075c916 View commit details
    Browse the repository at this point in the history