Skip to content

Missing symbol for windows_aarch64_cpu_features_arm in arm-64-windows runtime #8565

Description

@derek-gerstmann

I've run into a linking error on MSVS for Win ARM64 for a missing symbol in the Halide runtime (created from a recent build from Halide main):

error LNK2019: unresolved external symbol _ZN6Halide7Runtime8Internal23halide_get_cpu_featuresEv referenced in function halide_default_can_use_target_features

The halide runtime was created via a generator with target flag set to arm-64-windows.

This appears to result in an undefined symbol for the aarch64 cpu features:

> nm -u halide_runtime_arm64_windows_library.lib | grep _ZN6Halide7Runtime8Internal23halide_get_cpu_featuresEv
         U _ZN6Halide7Runtime8Internal23halide_get_cpu_featuresEv

> objdump --syms halide_runtime_arm64_windows_library.lib | grep _ZN6Halide7Runtime8Internal23halide_get_cpu_featuresEv
[1174](sec  0)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000000 _ZN6Halide7Runtime8Internal23halide_get_cpu_featuresEv

Currently investigating this. I can confirm the Halide build has WITH_AARCH64 being detected from LLVM_COMPONENTS correctly, and tracing through the LLVM_Runtime_Linker.cpp, the get_initmod_windows_aarch64_cpu_features_arm() is being added to the list of modules, so something appears to be going wrong inside of link_modules.

Metadata

Metadata

Labels

No labels
No labels

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions