[llvm] [LLVM][Cygwin] Define _GNU_SOURCE on Cygwin as well. (PR #138329)
via llvm-commits
llvm-commits at lists.llvm.org
Mon May 5 11:37:49 PDT 2025
jeremyd2019 wrote:
https://llvm.org/docs/CMake.html#developing-llvm-passes-out-of-source says use
```cmake
find_package(LLVM REQUIRED CONFIG)
separate_arguments(LLVM_DEFINITIONS_LIST NATIVE_COMMAND ${LLVM_DEFINITIONS})
add_definitions(${LLVM_DEFINITIONS_LIST})
include_directories(${LLVM_INCLUDE_DIRS})
```
clang/CMakeLists.txt has
```cmake
find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}")
...
include_directories(${LLVM_INCLUDE_DIRS})
link_directories("${LLVM_LIBRARY_DIR}")
```
So I'm thinking the separate_arguments and add_definitions should be plugged in there?
https://github.com/llvm/llvm-project/pull/138329
More information about the llvm-commits
mailing list