Skip to content

Add Arm64 Windows CI support, CMake #397

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

toor1245
Copy link
Contributor

Github actions added support Windows Arm64 for public repositories with runner name windows-11-arm:

Cmake has known issue related to build for Windows Arm64. CMAKE_SYSTEM_PROCESSOR on Arm64 target shows AMD64...

Issue discussion:

So CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID must be used to set PROCESSOR_IS_AARCH64 architecture:

Also, currently we have build fail for windows Arm64, I think it should be fixed as separate patch:

We can't use "define_introspection_and_hwcaps.inl" as a common file for all operating systems due to msvc compiler error C2099: initializer is not a constant, so as a workaround for Windows I used separate "define_introspection.inl"

@toor1245
Copy link
Contributor Author

@gchatelet, @Mizux, PR is ready to review

@toor1245 toor1245 changed the title Add Arm64 Windows CI support Add Arm64 Windows CI support, CMake May 17, 2025
@gchatelet gchatelet added misc non user facing: internal, cleanup, ci, release process cmake CMake related issue labels May 19, 2025
@@ -0,0 +1,26 @@
# ref: https://github.com/actions/runner-images
Copy link
Collaborator

@Mizux Mizux May 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pull_request:
schedule:
# min hours day(month) month day(week)
- cron: '0 0 7,22 * *'
Copy link
Collaborator

@Mizux Mizux May 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


jobs:
# Building using the github runner environement directly.
make:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please rename it cmake.

@Mizux
Copy link
Collaborator

Mizux commented May 19, 2025

I think on windows most features flag are not populated....
Maybe this test will also need a #ifndef windows...

TEST_F(CpuidAarch64Test, Aarch64FeaturesEnum) {
const char* last_name = GetAarch64FeaturesEnumName(AARCH64_LAST_);
EXPECT_STREQ(last_name, "unknown_feature");
for (int i = static_cast<int>(AARCH64_FP);
i != static_cast<int>(AARCH64_LAST_); ++i) {
const auto feature = static_cast<Aarch64FeaturesEnum>(i);
const char* name = GetAarch64FeaturesEnumName(feature);
ASSERT_FALSE(name == nullptr);
EXPECT_STRNE(name, "");
EXPECT_STRNE(name, last_name);
}
}

cf:

FillProcCpuInfoData(&info);

vs
https://github.com/google/cpu_features/blob/main/src/impl_aarch64_windows.c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmake CMake related issue misc non user facing: internal, cleanup, ci, release process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants