For whatever reason, the CMake did not like having the generic_
version live in the same directory. This patch pushes them to a new
directory, which is probably clearer anyway.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM with nit
libc/src/stdio/CMakeLists.txt | ||
---|---|---|
25 | shouldn't this be in an else with the above condition? |
libc/src/stdio/CMakeLists.txt | ||
---|---|---|
25 | 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. |
Make the GPU early exit in the generic version. This is the same approach that the math uses but we don't make all the entrypoints in this case so just special case exit for the GPU.
libc/src/stdio/CMakeLists.txt | ||
---|---|---|
25 | 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. |
shouldn't this be in an else with the above condition?