Registry Mirror
Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

File tree

‎cmake/modules/HandleLLVMOptions.cmake‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,11 @@ endif()
131131

132132
# Pass -Wl,-z,defs. This makes sure all symbols are defined. Otherwise a DSO
133133
# build might work on ELF but fail on MachO/COFF.
134-
if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR CYGWIN OR
135-
${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR
136-
${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") AND
134+
if(NOT (${TARGET_TRIPLE} MATCHES "darwin" OR
135+
${TARGET_TRIPLE} MATCHES "windows" OR
136+
${TARGET_TRIPLE} MATCHES "freebsd" OR
137+
${TARGET_TRIPLE} MATCHES "netbsd" OR
138+
${TARGET_TRIPLE} MATCHES "openbsd") AND
137139
NOT LLVM_USE_SANITIZER)
138140
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
139141
endif()

‎tools/dsymutil/DwarfLinker.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1635,7 +1635,7 @@ PointerIntPair<DeclContext *, 1> DeclContextTree::getChildDeclContext(
16351635
File)) {
16361636
Line = DIE->getAttributeValueAsUnsignedConstant(
16371637
&U.getOrigUnit(), dwarf::DW_AT_decl_line, 0);
1638-
#ifdef HAVE_REALPATH
1638+
#if defined(HAVE_REALPATH) && defined(PATH_MAX)
16391639
// Cache the resolved paths, because calling realpath is expansive.
16401640
if (const char *ResolvedPath = U.getResolvedPath(FileNum)) {
16411641
File = ResolvedPath;

0 commit comments

Comments
 (0)