Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 17a0639

Browse filesBrowse files
committed
[LLVM][Cygwin] Define _GNU_SOURCE on Cygwin as well. (llvm#138329)
Without it, certain functions such as dladdr are not make available by the headers. Signed-off-by: Jeremy Drake <github@jdrake.com>
1 parent f4b7b79 commit 17a0639
Copy full SHA for 17a0639

File tree

1 file changed

+6
-6
lines changed
Filter options

1 file changed

+6
-6
lines changed

‎llvm/cmake/config-ix.cmake

Copy file name to clipboardExpand all lines: llvm/cmake/config-ix.cmake
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ 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")
92+
endif()
9293

93-
# enable 64bit off_t on 32bit systems using glibc
94-
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
95-
add_compile_definitions(_FILE_OFFSET_BITS=64)
96-
list(APPEND CMAKE_REQUIRED_DEFINITIONS "-D_FILE_OFFSET_BITS=64")
97-
endif()
94+
# enable 64bit off_t on 32bit systems using glibc
95+
if(LLVM_USING_GLIBC AND CMAKE_SIZEOF_VOID_P EQUAL 4)
96+
add_compile_definitions(_FILE_OFFSET_BITS=64)
97+
list(APPEND CMAKE_REQUIRED_DEFINITIONS "-D_FILE_OFFSET_BITS=64")
9898
endif()
9999

100100
# include checks

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.