[libcxx-commits] [PATCH] D88718: [libcxx] Port to NuttX(https://nuttx.apache.org/) RTOS

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 18 13:14:11 PST 2020


ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.

Do you have commit privilege? If so, please go ahead. Otherwise, please provide `Author Name <email at domain>` I should use when committing this for you.



================
Comment at: libcxx/include/__config:27
+// not the host OS.
+#if defined(__NuttX__)
+#undef __linux__
----------------
xiaoxiang781216 wrote:
> ldionne wrote:
> > I'm not comfortable with undefining these macros here in libc++. Those are compiler-defined macros, and it's not libc++'s job to undefine them.
> > 
> > It seems to me that you either need a compiler target triple that understands NuttX, or to do whatever macro magic you want to do lower in the stack.
> Simulator is a special case here: It's a normal program run on Ubunutu or macOS and then should be compiled by host gcc toolchain, but all functions(POSIX, libc...) are provided by NuttX. If we don't undefine these macros, we have to modify every location where reference them. The later approach is very fragile and hard to maintain. Do you have other suggestion?
> Do you have other suggestion?

Yes, a compiler target triple that actually understands your platform.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88718/new/

https://reviews.llvm.org/D88718



More information about the libcxx-commits mailing list