You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In llvm#138329, _GNU_SOURCE was added for Cygwin, but when building Clang
standalone against an installed LLVM this definition was not picked up,
resulting in undefined strnlen. Follow the documentation in
https://llvm.org/docs/CMake.html#developing-llvm-passes-out-of-source
and add the LLVM_DEFINITIONS in Clang's CMakeLists.txt.
Get rid of the list(REMOVE CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
later, as list(REMOVE) is documented to remove *all* occurences of the
item, not just the one that was just added. Instead, make use of
cmake_push_check_state() and cmake_pop_check_state(), which is already
used in other cmake files.
0 commit comments