Skip to content

Commit 31e9552

Browse files
committed
[LLVM][Cygwin] Define _GNU_SOURCE on Cygwin as well.
Without it, certain functions such as dladdr are not make available by the headers. Signed-off-by: Jeremy Drake <[email protected]>
1 parent 173ec72 commit 31e9552

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/cmake/config-ix.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ endif()
8686
# Keep this at the top to make sure we don't add _GNU_SOURCE dependent checks
8787
# before adding it.
8888
check_symbol_exists(__GLIBC__ stdio.h LLVM_USING_GLIBC)
89-
if(LLVM_USING_GLIBC)
89+
if(LLVM_USING_GLIBC OR CYGWIN)
9090
add_compile_definitions(_GNU_SOURCE)
9191
list(APPEND CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE")
9292

0 commit comments

Comments
 (0)