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

Commit e54c542

Browse files
committed
Merge pull request #70 from TimNN/freebsd-4.0
Freebsd Fixes for LLVM 4.0
2 parents 0f81d72 + 0990991 commit e54c542

File tree

6 files changed

+15
-9
lines changed

6 files changed

+15
-9
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -913,10 +913,10 @@ if( LLVM_INCLUDE_TESTS )
913913
ALWAYS_CLEAN)
914914
endif()
915915
add_subdirectory(test)
916-
add_subdirectory(unittests)
917-
if( LLVM_INCLUDE_UTILS )
918-
add_subdirectory(utils/unittest)
919-
endif()
916+
# add_subdirectory(unittests)
917+
# if( LLVM_INCLUDE_UTILS )
918+
# add_subdirectory(utils/unittest)
919+
# endif()
920920

921921
if (WIN32)
922922
# This utility is used to prevent crashing tests from calling Dr. Watson on

cmake/modules/HandleLLVMOptions.cmake

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,12 @@ endif()
144144

145145
# Pass -Wl,-z,defs. This makes sure all symbols are defined. Otherwise a DSO
146146
# build might work on ELF but fail on MachO/COFF.
147-
if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR CYGWIN OR
148-
${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR
149-
${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") AND
147+
if(NOT (${TARGET_TRIPLE} MATCHES "darwin" OR
148+
${TARGET_TRIPLE} MATCHES "windows" OR
149+
${TARGET_TRIPLE} MATCHES "mingw" OR
150+
${TARGET_TRIPLE} MATCHES "freebsd" OR
151+
${TARGET_TRIPLE} MATCHES "netbsd" OR
152+
${TARGET_TRIPLE} MATCHES "openbsd") AND
150153
NOT LLVM_USE_SANITIZER)
151154
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
152155
endif()

lib/Demangle/ItaniumDemangle.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
#include <algorithm>
1717
#include <cctype>
18+
#include <cstdio>
1819
#include <cstdlib>
1920
#include <cstring>
2021
#include <numeric>

lib/Support/TarWriter.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
#include "llvm/Support/MathExtras.h"
2929
#include "llvm/Support/Path.h"
3030

31+
#include <cstdio>
32+
3133
using namespace llvm;
3234

3335
// Each file in an archive must be aligned to this block size.

tools/dsymutil/DwarfLinker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1653,7 +1653,7 @@ PointerIntPair<DeclContext *, 1> DeclContextTree::getChildDeclContext(
16531653
File);
16541654
(void)gotFileName;
16551655
assert(gotFileName && "Must get file name from line table");
1656-
#ifdef HAVE_REALPATH
1656+
#if defined(HAVE_REALPATH) && defined(PATH_MAX)
16571657
char RealPath[PATH_MAX + 1];
16581658
RealPath[PATH_MAX] = 0;
16591659
if (::realpath(File.c_str(), RealPath))

tools/llvm-xray/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ set(LLVM_XRAY_TOOLS
1717
xray-graph-diff.cc
1818
xray-registry.cc)
1919

20-
add_llvm_tool(llvm-xray llvm-xray.cc ${LLVM_XRAY_TOOLS})
20+
# add_llvm_tool(llvm-xray llvm-xray.cc ${LLVM_XRAY_TOOLS})

0 commit comments

Comments
 (0)