[libc-commits] [PATCH] D157544: [libc][Fix] Move generic stdio implementations to a new directory

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Aug 9 14:03:15 PDT 2023


sivachandra added inline comments.


================
Comment at: libc/src/stdio/CMakeLists.txt:24
 endif()
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/generic)
 
----------------
jhuber6 wrote:
> michaelrj wrote:
> > shouldn't this be in an `else` with the above condition?
> We already have a `linux/` special-case which cause this to not be built. I believe this is the same approach we do for the math since even though we make the target, if there's no top level dependency on it we won't actually use it.
I suggested `elseif` instead of `else` because we want to ignore (may be with a VERBOSE message) if neither an OS-specific implementation nor a generic implementation is available. This is useful in the case when a particular entrypoint is not enabled in entrypoints.txt. In such a case, the real entrypoint will be skipped and hence the ALIAS should also be skipped. The right fix is likely here: https://github.com/llvm/llvm-project/blob/main/libc/cmake/modules/LLVMLibCObjectRules.cmake#L309. But, that is beyond the scope of this change.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157544



More information about the libc-commits mailing list