-
Notifications
You must be signed in to change notification settings - Fork 132
Cleanup of win64 and alike ABI usage and MSVC legacy #499
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
Merged
danbugs
merged 12 commits into
hyperlight-dev:main
from
danbugs:cleanup-abi-usage-and-msvc-legacy
May 16, 2025
Merged
Cleanup of win64 and alike ABI usage and MSVC legacy #499
danbugs
merged 12 commits into
hyperlight-dev:main
from
danbugs:cleanup-abi-usage-and-msvc-legacy
May 16, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Now, because we no longer support building the guest library for MSVC, we directly specify to use 'x86_64-unknown-none' for it in the script. Otherwise, on Windows, as is, we'd try to use MSVC. Signed-off-by: danbugs <[email protected]>
Our implementations of setjmp and longjmp conformed to the win64 ABI. With removal of PE support, we can leverage musl's implementation instead. Signed-off-by: danbugs <[email protected]>
chkstk was a dependency of the msvc toolchain. With PE support removed, we can get rid of it. Signed-off-by: danbugs <[email protected]>
We used the sysv64 ABI for exception stuff. This ABI is not available for every target so having it there unconditionally makes the hyperlight_guest lib not be compilable to said targets. This commit changes the ABI to "C" (i.e., smt more commonly used) and gates it behind a x86_64 cfg as the assembly code is dependent on 64-bit architectures. Signed-off-by: danbugs <[email protected]>
Originally, because we only supported PE, our entrypoint used the win64 ABI. Now, with PE file support being removed, we can use an ABI that wouldn't be restrictive in compiling the guest library to targets that don't support the win64 ABI. Signed-off-by: danbugs <[email protected]>
Similar to the entrypoint change in the previous commit, we can change the ABI of the dispatch function. Signed-off-by: danbugs <[email protected]>
__CxxFrameHandler3 and _fltused were symbols only required by the msvc toolchain and can now be removed. Signed-off-by: danbugs <[email protected]>
…of __security_cookie symbol The __security_cookie symbol and its usage were only required by the MSVC toolchain. W/ the removal of PE support, we can remove it from the guest lib. Signed-off-by: danbugs <[email protected]>
…rgo/config.toml of test guests W/ PE support removed, these are no longer needed or correct. Signed-off-by: danbugs <[email protected]>
In particular, I am removing the instructions related to installing the msvc target to compile the guests to PE. Signed-off-by: danbugs <[email protected]>
…container W/ PE support removed, our .devcontainer no longer needs the msvc target installed. Signed-off-by: danbugs <[email protected]>
See hyperlight-dev#498 for more details. Signed-off-by: danbugs <[email protected]>
3f916aa
to
43bcf6e
Compare
ludfjig
approved these changes
May 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
dblnz
approved these changes
May 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See individual commit messages for more details.