[llvm] [LLVM][Cygwin] Define _GNU_SOURCE on Cygwin as well. (PR #138329)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Fri May 2 12:53:10 PDT 2025
mstorsjo wrote:
> so
>
> ```cmake
> if (CYGWIN)
> add_compile_definitions(_GNU_SOURCE)
> list(APPEND CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE")
> endif ()
> ```
>
> right above, to go with the `SunOS` and `AIX` checks, and leave the `LLVM_USING_GLIBC` if alone?
Nah, I'd split the current `LLVM_USING_GLIBC` into two, one `if (LLVM_USING_GLIBC OR CYGWIN)` and one `if (LLVM_USING_CYGWIN)`. The comment above seems mostly relevant and on point for cygwin too, so we can keep the code in place where it is right now.
https://github.com/llvm/llvm-project/pull/138329
More information about the llvm-commits
mailing list