This is an archive of the discontinued LLVM Phabricator instance.

[libc] Enable spawn lib in riscv
ClosedPublic

Authored by mikhail.ramalho on Mar 15 2023, 8:42 AM.

Details

Summary

In this patch we add support for the spawn lib in riscv.

Only small changes were required, the biggest one was to use of dup3
instead of dup2, if the latter is not available. This follows our
implementation of dup2.

Diff Detail

Event Timeline

Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 15 2023, 8:42 AM
mikhail.ramalho requested review of this revision.Mar 15 2023, 8:42 AM

LGTM with one comment.

libc/src/spawn/linux/posix_spawn.cpp
22

You should include <signal.h> not the macro file unconditionally. So, no ifdef, just #include <signal.h>.

Fixed header include

mikhail.ramalho marked an inline comment as done.Mar 15 2023, 9:35 AM
sivachandra accepted this revision.Mar 15 2023, 9:45 AM

We have libc RISCV64 builders now: https://lab.llvm.org/buildbot/#/workers/202
Please watch them after landing.

This revision is now accepted and ready to land.Mar 15 2023, 9:45 AM