-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
[AArch64][compiler-rt] Add LSE support for Windows. #116706
Merged
Merged
Conversation
This file contains 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
Change-Id: Ic639af3d799163fca829d6f37f830ccec63ab453
You can test this locally with the following command:git-clang-format --diff 7b525495e8574285c19188be11e7ef8a51382ff3 cb584ebfd30f3be8513263e198e0c8b32791d681 --extensions c,inc -- compiler-rt/lib/builtins/cpu_model/aarch64/lse_atomics/windows.inc compiler-rt/lib/builtins/cpu_model/aarch64.c View the diff from clang-format here.diff --git a/compiler-rt/lib/builtins/cpu_model/aarch64/lse_atomics/windows.inc b/compiler-rt/lib/builtins/cpu_model/aarch64/lse_atomics/windows.inc
index fff1593e1f..ae76e2baf1 100644
--- a/compiler-rt/lib/builtins/cpu_model/aarch64/lse_atomics/windows.inc
+++ b/compiler-rt/lib/builtins/cpu_model/aarch64/lse_atomics/windows.inc
@@ -1,6 +1,6 @@
#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
#include <processthreadsapi.h>
+#include <windows.h>
#ifndef PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE
#define PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE 34
|
include order is important. Change-Id: I509781a75ce86c91e646742d80f56d9c44f23f18
mstorsjo
approved these changes
Nov 19, 2024
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, this seems straightforward enough.
nikic
added a commit
to nikic/compiler-builtins
that referenced
this pull request
Jan 28, 2025
llvm/llvm-project#116706 added Windows support to cpu_model. Compiling for UEFI also goes through that code path, because we treat it as a windows target. However, including windows.h is not actually going to work (and the used API would not be available in an UEFI environment). Disable building of cpu_model on UEFI to fix this.
nikic
added a commit
to nikic/compiler-builtins
that referenced
this pull request
Jan 28, 2025
llvm/llvm-project#116706 added Windows support to cpu_model. Compiling for UEFI also goes through that code path, because we treat it as a windows target. However, including windows.h is not actually going to work (and the used API would not be available in an UEFI environment). Disable building of cpu_model on UEFI to fix this.
tgross35
pushed a commit
to nikic/compiler-builtins
that referenced
this pull request
Jan 28, 2025
llvm/llvm-project#116706 added Windows support to cpu_model. Compiling for UEFI also goes through that code path, because we treat it as a windows target. However, including windows.h is not actually going to work (and the used API would not be available in an UEFI environment). Disable building of cpu_model on UEFI to fix this.
tgross35
pushed a commit
to rust-lang/compiler-builtins
that referenced
this pull request
Jan 28, 2025
llvm/llvm-project#116706 added Windows support to cpu_model. Compiling for UEFI also goes through that code path, because we treat it as a windows target. However, including windows.h is not actually going to work (and the used API would not be available in an UEFI environment). Disable building of cpu_model on UEFI to fix this.
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.
No description provided.