[libc] Include empty remove in baremetal stdio.h (#85336)

This is required to avoid compilation error in libc++.

See #85335 for more details.
This commit is contained in:
Petr Hosek 2024-03-16 23:17:19 -07:00 committed by GitHub
parent 252d01952c
commit 5a75242bc8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 28 additions and 0 deletions

View File

@ -79,6 +79,7 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.inttypes.strtoumax
# stdio.h entrypoints
libc.src.stdio.remove
libc.src.stdio.sprintf
libc.src.stdio.snprintf
libc.src.stdio.vsprintf

View File

@ -79,6 +79,7 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.inttypes.strtoumax
# stdio.h entrypoints
libc.src.stdio.remove
libc.src.stdio.sprintf
libc.src.stdio.snprintf
libc.src.stdio.vsprintf

View File

@ -0,0 +1,7 @@
add_entrypoint_object(
remove
SRCS
remove.cpp
HDRS
../remove.h
)

View File

@ -0,0 +1,19 @@
//===-- Linux implementation of remove ------------------------------------===//
//
// 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/stdio/remove.h"
#include "src/__support/common.h"
namespace LIBC_NAMESPACE {
// TODO: This is a temporary workaround for issue #85335.
LLVM_LIBC_FUNCTION(int, remove, (const char *)) { return -1; }
} // namespace LIBC_NAMESPACE