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

.github, cli, completion: cross-compile arm64 Windows asset #797

Merged
merged 20 commits into from
Aug 18, 2023

Commits on Aug 17, 2023

  1. Configuration menu
    Copy the full SHA
    672ddad View commit details
    Browse the repository at this point in the history
  2. .github: fix silently failing arm64 Windows build

    The new job indicated success, but didn't upload an executable.
    
    This was because on the Windows runner, the default shell is PowerShell:
    
        Run ./.github/bin/install-zig
          ./.github/bin/install-zig
          shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
    
    Explicitly set the shell to bash for every cross compilation job.
    ee7 committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    5878bba View commit details
    Browse the repository at this point in the history
  3. .github(cross-compile): fix executable name on Windows

    Fix error:
    
        CC: configlet.nim
        Hint:  [Link]
        Hint: mm: refc; threads: on; opt: size; options: -d:release
        92399 lines; 54.815s; 167.895MiB peakmem; proj: D:\a\configlet\configlet\src\configlet.nim; out: D:\a\configlet\configlet\configlet.exe [SuccessX]
             Info:  Nimble data file "C:\Users\runneradmin\.nimble\nimbledata2.json" has been saved.
        stripping large comment section from executable...
        C:\Program Files\LLVM\bin\llvm-strip.exe: error: 'configlet': no such file or directory
    
    (It turns out that `llvm-strip` is installed in the Windows runners).
    ee7 committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    64a0502 View commit details
    Browse the repository at this point in the history
  4. .github(cross-compile): pass --strip-all-gnu to llvm-strip

    Some llvm-strip usage:
    
      --remove-section=section
                             Remove <section>
      -R <value>             Alias for --remove-section
      --strip-all-gnu        Compatible with GNU's --strip-all
      --strip-all            Remove non-allocated sections outside segments. .gnu.warning* and .ARM.attribute sections are not removed
      --strip-debug          Remove all debug sections
      --strip-sections       Remove all section headers and all sections not in segments
      --strip-symbol=symbol  Strip <symbol>
      --strip-unneeded       Remove all symbols not needed by relocations
      -S                     Alias for --strip-debug
      -s                     Alias for --strip-all
    ee7 committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    117389b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    512ef4a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5585617 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    425a056 View commit details
    Browse the repository at this point in the history
  8. .github(cross-compile): compress arm64 Windows as zip, not tar.gz

    The x86_64 Windows archive is .zip.
    ee7 committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    3e27bc3 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    770182d View commit details
    Browse the repository at this point in the history
  10. .github(install-zig): pass -q to unzip

    Try to suppress 10,000 lines of output. It printed a line for each
    extracted file.
    ee7 committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    dd8bb5d View commit details
    Browse the repository at this point in the history
  11. .github(cross-compile): use llvm-readobj, not dumpbin

    dumpbin probably exists somewhere on the runner, but it wasn't found.
    ee7 committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    65fee21 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    8318c80 View commit details
    Browse the repository at this point in the history
  13. .github: try cross-compiling from x86_64 linux to arm64 windows

    Rather than from x86_64 windows, which seemed to produce an x86_64
    executable:
    
        $ llvm-readobj configlet.exe
        File: configlet.exe
        Format: COFF-x86-64
        Arch: x86_64
        AddressSize: 64bit
    
    despite compiling with:
    
        --cpu:arm64 --os:windows -d:zig -d:target:aarch64-windows-gnu
    ee7 committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    8ea7f02 View commit details
    Browse the repository at this point in the history
  14. .github(cross-compile): improve cross-compilation from Linux to Windows

    When cross-compiling from Linux to Windows:
    
    - output the executable with a `.exe` file extension, by passing -o to
      Nim
    
    - fix error for `llvm-readobj` not found
    ee7 committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    92a278d View commit details
    Browse the repository at this point in the history
  15. Revert ".github(cross-compile): improve cross-compilation from Linux …

    …to Windows"
    
    This reverts commit 92a278d.
    
    Nim gets passed
    
        -o:/home/runner/work/configlet/configlet/configlet
    
    which overwrites the given
    
        -o:configlet.exe
    ee7 committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    96fb657 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    8a1edde View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2023

  1. .github(cross-compile): add stripping again

    Decrease the diff size of the current PR.
    
    This won't do anything currently, since we don't do any cross-compiling
    on a machine where llvm-strip is available.
    ee7 committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    60fa400 View commit details
    Browse the repository at this point in the history
  2. .github(cross-compile): improve post-build info

    Make it work on Linux, macOS, and Windows.
    ee7 committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    2f53de9 View commit details
    Browse the repository at this point in the history
  3. Revert "config: try removing --passL:-static for windows"

    This reverts commit 8318c80.
    
    Do this in a follow-up PR.
    ee7 committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    09acdcd View commit details
    Browse the repository at this point in the history
  4. .github(cross-compile): remove --strip-all-gnu again

    Not used for now. Reduce the PR diff size.
    ee7 committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    14770c9 View commit details
    Browse the repository at this point in the history