[libc-commits] [libc] [libc] Add osutils for Windows and make libc and its tests build on Windows target (PR #104676)

Sirui Mu via libc-commits libc-commits at lists.llvm.org
Sun Aug 18 04:44:36 PDT 2024


================
@@ -0,0 +1,19 @@
+//===----------- Windows implementation of an exit function -----*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/__support/macros/config.h"
+
+#include <Windows.h>
+
+namespace LIBC_NAMESPACE_DECL {
+namespace internal {
+
+__attribute__((noreturn)) void exit(int status) { ExitProcess(status); }
----------------
Lancern wrote:

Updated.

https://github.com/llvm/llvm-project/pull/104676


More information about the libc-commits mailing list