Skip to content

[bug] Fix halide_get_cpu_features() linkage to avoid name mangling issues#8573

Merged
derek-gerstmann merged 5 commits intomainfrom
dg/fix_cpu_features_linkage
Feb 12, 2025
Merged

[bug] Fix halide_get_cpu_features() linkage to avoid name mangling issues#8573
derek-gerstmann merged 5 commits intomainfrom
dg/fix_cpu_features_linkage

Conversation

@derek-gerstmann
Copy link
Copy Markdown
Contributor

This PR changes the linkage of halide_get_cpu_features(...) into extern "C" to avoid issues with name mangling between different platform ABIs. It also changes CpuFeatures into a POD struct, which is passed by pointer to allow C linkage.

Fixes: #8565

Derek Gerstmann added 2 commits February 11, 2025 14:59
…mangling issues.

Change CpuFeatures to POD struct passed by pointer.
Update all backend cpu feature implementations.
@derek-gerstmann derek-gerstmann self-assigned this Feb 11, 2025
Comment thread src/runtime/aarch64_cpu_features.cpp Outdated
@derek-gerstmann
Copy link
Copy Markdown
Contributor Author

derek-gerstmann commented Feb 12, 2025

NOTE: worker arm64-linux-worker-4 has no disk space left, which is causing the llvm-20-arm32-linux-cmake build to fail.

Otherwise ready to merge.

@abadams
Copy link
Copy Markdown
Member

abadams commented Feb 12, 2025

The macos workers succeeded, so I guess that cantFail issue showing up on other PRs was a temporary llvm issue. Some problems go away if you ignore them.

Comment thread src/runtime/can_use_target.cpp Outdated
@abadams
Copy link
Copy Markdown
Member

abadams commented Feb 12, 2025

lgtm other than suggest changing to abort_if_false

…r error code from can_use_target_features).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing symbol for windows_aarch64_cpu_features_arm in arm-64-windows runtime

2 participants