Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libc/config/baremetal/arm/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions libc/config/baremetal/riscv/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions libc/src/stdio/baremetal/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
add_entrypoint_object(
remove
SRCS
remove.cpp
HDRS
../remove.h
)
19 changes: 19 additions & 0 deletions libc/src/stdio/baremetal/remove.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===-- Linux implementation of remove ------------------------------------===//
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Update comment and formatting.

//
// 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