[AArch64][compiler-rt] Add LSE support for Windows. by DanielKristofKiss · Pull Request #116706 · llvm/llvm-project (original) (raw)

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

[ Show hidden characters]({{ revealButtonHref }})

@DanielKristofKiss

@DanielKristofKiss

Change-Id: Ic639af3d799163fca829d6f37f830ccec63ab453

@github-actions

⚠️ 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

@DanielKristofKiss

include order is important.

Change-Id: I509781a75ce86c91e646742d80f56d9c44f23f18

mstorsjo

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 nikic mentioned this pull request

Jan 27, 2025

7 tasks

nikic added a commit to nikic/compiler-builtins that referenced this pull request

Jan 28, 2025

@nikic

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

@nikic

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 nikic mentioned this pull request

Jan 28, 2025

tgross35 pushed a commit to nikic/compiler-builtins that referenced this pull request

Jan 28, 2025

@nikic @tgross35

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

@nikic @tgross35

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 tgross35/rust that referenced this pull request

Jun 3, 2025

@nikic @tgross35

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.

tautschnig pushed a commit to model-checking/verify-rust-std that referenced this pull request

Jun 17, 2025

@nikic @tgross35

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.

Labels