Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-25870

Windows - Fix cross-compilation for ARM64

    XMLWordPrintable

Details

    Description

      Visual Studio 2019 includes ARM64 cross-compiler.
      While our CI is not capable of running any tests on it, we can clean up code to remove the
      hardcoded assumption that Windows equates Intel, perhaps such a cleanup could be useful in the future, when AMD64 ecosystem evolves

      The cross-compilation works like this

      patch wolfssl

      Fix wolfssl - apply that patch
      https://github.com/vaintroub/wolfssl/commit/29968716ea050fd905be55cec7e290a674fd075d

      Hopefully it will be fixed soon in wolfssl proper.

      build tools used during cross-compilation - comp_err, gen_lex_hash

      cd sourcedir
      mkdir x64
      cd x64
      cmake ..
      cmake --build . --target import_executables --config relwithdebinfo
      

      build ARM64, crosscompilation

      cd sourcedir
      mkdir arm64
      cd arm64
      cmake .. -A ARM64 -DCMAKE_SYSTEM_NAME=Windows -DIMPORT_EXECUTABLES=C:/path/to/sourcedir/x64/import_executables.cmake
      cmake --build . --config relwithdebinfo
      # packaging, as usual
      cmake --build . --config relwithdebinfo --target win_package
      cmake --build . --config relwithdebinfo --target MSI
      

      Note , that setting -DCMAKE_SYSTEM_NAME is how CMake known that we're crosscompiling
      -DIMPORT_EXECUTABLES=C:/path/to/sourcedir/x64/import_executables.cmake lets the native (x64) auxiliary executables run during build process, and -A ARM64 is CMake-ish way to chose the ARM64 cross-compiler.

      To build MSI, WIX toolset version 3.14 is necessary, which is still under development, but betas are available. No other WIX version can handle ARM64 yet.

      Attachments

        Issue Links

          Activity

            People

              wlad Vladislav Vaintroub
              wlad Vladislav Vaintroub
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.