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

[AArch64][compiler-rt] Add LSE support for Windows. #116706

Merged
merged 2 commits into from
Nov 20, 2024

Conversation

DanielKristofKiss
Copy link
Member

No description provided.

Change-Id: Ic639af3d799163fca829d6f37f830ccec63ab453
Copy link

github-actions bot commented Nov 18, 2024

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

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
Copy link
Member

@mstorsjo mstorsjo left a 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.

@DanielKristofKiss DanielKristofKiss merged commit 77bf34c into llvm:main Nov 20, 2024
6 of 7 checks passed
@nikic nikic mentioned this pull request Jan 27, 2025
4 tasks
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants