Skip to content

Conversation

@cpplearner
Copy link
Contributor

See @StephanTLavavej's comment in #5459 (comment):

I had to push another commit to fix the ARM64EC internal build. The use of popcount() in the STL's DLL revealed that (unlike VCRuntime) we weren't linking against softintrin.lib, which is necessary to be able to use the __popcnt64 intrinsic. (Most people don't have to do anything special for this, but because the STL is a defaultlib, we link with /nodefaultlib and so we have to do everything manually.)

We need to apply the same fix to CMakeLists.txt.

@cpplearner cpplearner requested a review from a team as a code owner May 11, 2025 01:01
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews May 11, 2025

add_library(msvcp${D_SUFFIX} SHARED)
target_link_libraries(msvcp${D_SUFFIX} PRIVATE msvcp${D_SUFFIX}_eha_objects msvcp${D_SUFFIX}_objects msvcp${D_SUFFIX}_init_objects "${TOOLSET_LIB}/vcruntime${D_SUFFIX}.lib" "${TOOLSET_LIB}/msvcrt${D_SUFFIX}.lib" "ucrt${D_SUFFIX}.lib")
if(VCLIBS_TARGET_ARCHITECTURE MATCHES "^arm64(ec)?$")
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure ARM64 non EC needs that?
It somehow linked and built tests before the change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure. msvcp.settings.targets seems to do this, but I don't understand why.

<TargetLib Condition="'$(BuildArchitecture)' == 'arm64' or '$(BuildArchitecture)' == 'arm64ec'" Include="$(SdkLibPath)\softintrin.lib"/>

@cpplearner
Copy link
Contributor Author

fused into #5492

@cpplearner cpplearner closed this May 11, 2025
@github-project-automation github-project-automation bot moved this from Initial Review to Done in STL Code Reviews May 11, 2025
@cpplearner cpplearner deleted the patch-1 branch May 11, 2025 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants