[llvm] [bazel][windows] Add ntdll linkopt for Support (PR #94501)

Jordan Rupprecht via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 5 09:57:47 PDT 2024


https://github.com/rupprecht created https://github.com/llvm/llvm-project/pull/94501

Mirror the cmake change in cb7690af09b95bb944baf1b5a9ffb18f86c12130

```
lld-link: error: undefined symbol: __declspec(dllimport) RtlGetLastNtStatus
>>> referenced by Support.lib(ErrorHandling.obj):(class std::error_code __cdecl llvm::mapLastWindowsError(void))
```

>From b77d4d3f73eca71fa749f9737d3311415784e119 Mon Sep 17 00:00:00 2001
From: Jordan Rupprecht <rupprecht at google.com>
Date: Wed, 5 Jun 2024 09:54:47 -0700
Subject: [PATCH] [bazel][windows] Add ntdll linkopt for Support

Mirror the cmake change in cb7690af09b95bb944baf1b5a9ffb18f86c12130

```
lld-link: error: undefined symbol: __declspec(dllimport) RtlGetLastNtStatus
>>> referenced by Support.lib(ErrorHandling.obj):(class std::error_code __cdecl llvm::mapLastWindowsError(void))
```
---
 utils/bazel/llvm-project-overlay/llvm/BUILD.bazel | 1 +
 1 file changed, 1 insertion(+)

diff --git a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
index a67f20533ae22..2ffbc783ec972 100644
--- a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
@@ -287,6 +287,7 @@ cc_library(
     linkopts = select({
         "@platforms//os:windows": [
             "ws2_32.lib",
+            "ntdll.lib",
         ],
         "@platforms//os:freebsd": [
             "-pthread",



More information about the llvm-commits mailing list