Skip to content
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

Use /EMITVOLATILEMETADATA:NO with Microsoft Linker #96

Merged
merged 1 commit into from
Jan 4, 2022

Conversation

dra27
Copy link
Member

@dra27 dra27 commented Nov 29, 2021

Recent Visual Studio 2019 and 2022 are enabling volatile metadata on x64 by default. There don't appear to be many technical details available, but the purpose is to improve emulation of AMD64 on ARM64.
Sometimes the .voltbl sections are copying correctly and then seemingly minor code changes can break it, causing an obscure and undocumented error from the Microsoft Linker.

In parallel, OCaml will start to adding /d2VolatileMetadata- to its internal CFLAGS which should suppress the problem from both sides.

Recent Visual Studio 2019 and 2022 are enabling volatile metadata on
x64 by default. There don't appear to be many technical details
available, but the purpose is to improve emulation of AMD64 on ARM64.
Sometimes the .voltbl sections are copying correctly and then seemingly
minor code changes can break it, causing an obscure and undocumented
error from the Microsoft Linker.

OCaml is starting to add the flag to the compiler to disable its
generation, this patch also stops the linker from attempting to use the
section if it's there.
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.

1 participant