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

Michael Jones via libc-commits libc-commits at lists.llvm.org
Tue Aug 20 10:53:00 PDT 2024


================
@@ -0,0 +1,22 @@
+//===------------- Windows implementation of IO utils -----------*- 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 "io.h"
+#include "src/__support/macros/config.h"
+
+#define WIN32_LEAN_AND_MEAN
+#include <Windows.h>
----------------
michaelrj-google wrote:

including the `Windows` headers here works, but it will cause problems if we ever want to do a fully standalone build. Given how windows is set up I'm fine with saying that windows is overlay only for now, but you should add a comment explaining that decision.

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


More information about the libc-commits mailing list