-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Windows/ARM64 assembly build (#1697)
### Issues: * Addresses: aws/aws-lc-rs#453 ### Description of changes: * When building for Windows/ARM64 with the "Visual Studio" generator (instead of Ninja) the "*.S" assembly source files for libraries are ignored. * This change provides a custom command to assemble the require objects files and adds them to the list of sources for the library. ### Call-outs: * See related aws-lc-rs PR: aws/aws-lc-rs#452 ### Testing * I've added CI tests to build for Windows using the "Visual Studio" generator. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.
- Loading branch information
Showing
7 changed files
with
129 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,13 +63,53 @@ jobs: | |
options: | | ||
CMAKE_SYSTEM_NAME=Windows \ | ||
CMAKE_SYSTEM_PROCESSOR=x86_64 \ | ||
CMAKE_MAKE_PROGRAM=ninja.exe \ | ||
CMAKE_BUILD_TYPE=Release \ | ||
- name: Build Project | ||
run: cmake --build ./build --target all | ||
- name: Run tests | ||
run: cmake --build ./build --target run_tests | ||
clang-cl: | ||
clang-cl-msbuild: | ||
if: github.repository_owner == 'aws' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: | ||
- x64 | ||
- x64_arm64 | ||
runs-on: windows-latest | ||
env: | ||
CMAKE_GENERATOR: "Visual Studio 17 2022" | ||
CMAKE_GENERATOR_TOOLSET: "ClangCL,host=x64" | ||
steps: | ||
- if: ${{ matrix.target == 'x64' }} | ||
name: Install NASM | ||
uses: ilammy/[email protected] | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- uses: TheMrMilchmann/setup-msvc-dev@v3 | ||
with: | ||
arch: ${{ matrix.target }} | ||
- if: ${{ matrix.target == 'x64' }} | ||
name: Setup CMake | ||
uses: threeal/[email protected] | ||
with: | ||
options: | | ||
CMAKE_BUILD_TYPE=Release \ | ||
- if: ${{ matrix.target == 'x64_arm64' }} | ||
name: Setup CMake | ||
uses: threeal/[email protected] | ||
with: | ||
options: | | ||
CMAKE_GENERATOR_PLATFORM=ARM64 \ | ||
CMAKE_SYSTEM_NAME=Windows \ | ||
CMAKE_SYSTEM_PROCESSOR=ARM64 \ | ||
CMAKE_BUILD_TYPE=Release \ | ||
- name: Build Project | ||
run: cmake --build ./build --target all_tests | ||
- if: ${{ matrix.target == 'x64' }} | ||
name: Run tests | ||
run: cmake --build ./build --target run_tests | ||
clang-cl-ninja: | ||
if: github.repository_owner == 'aws' | ||
strategy: | ||
fail-fast: false | ||
|
@@ -97,9 +137,6 @@ jobs: | |
c-compiler: clang-cl | ||
cxx-compiler: clang-cl | ||
options: | | ||
CMAKE_CROSSCOMPILING=${{ ((matrix.target == 'x64') && '0') || '1' }} \ | ||
CMAKE_SYSTEM_NAME=Windows \ | ||
CMAKE_SYSTEM_PROCESSOR=x86_64 \ | ||
CMAKE_BUILD_TYPE=Release \ | ||
- if: ${{ matrix.target == 'x64_arm64' }} | ||
name: Setup CMake | ||
|
@@ -109,7 +146,6 @@ jobs: | |
c-compiler: clang-cl | ||
cxx-compiler: clang-cl | ||
options: | | ||
CMAKE_CROSSCOMPILING=1 \ | ||
CMAKE_SYSTEM_NAME=Windows \ | ||
CMAKE_SYSTEM_PROCESSOR=ARM64 \ | ||
CMAKE_C_COMPILER_TARGET=arm64-pc-windows-msvc \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters