Skip to content

Commit d7a5399

Browse files
committed
Merge branch 'embed-lld'
Zig now depends on LLVM 5.0.0. For the latest version that supports LLVM 4.0.1, use 2a49c87. Unfortunately we had to embed LLD into Zig due to some MACH-O related LLD bugs. One of them is already upstream and another is awaiting feedback on the llvm-dev mailing list. You can use cmake option -DZIG_FORCE_EXTERNAL_LLD=ON to still use external LLD if you want to live with the MACH-O bugs or if your system LLD is patched. Closes #273
2 parents 2a49c87 + 1525e2c commit d7a5399

File tree

1,823 files changed

+128198
-857
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,823 files changed

+128198
-857
lines changed

.travis.yml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
1+
os:
2+
- linux
3+
- osx
14
dist: trusty
5+
osx_image: xcode8.3
26
sudo: required
37
language: cpp
48
before_install:
5-
- sudo sh -c 'echo "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-4.0 main" >> /etc/apt/sources.list'
6-
- wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
7-
- sudo apt-get update -q
9+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ci/travis_linux_before_install; fi
10+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ci/travis_osx_before_install; fi
811
install:
9-
- sudo apt-get remove -y llvm-*
10-
- sudo rm -rf /usr/local/*
11-
- sudo apt-get install -y clang-4.0 libclang-4.0 libclang-4.0-dev llvm-4.0 llvm-4.0-dev liblld-4.0 liblld-4.0-dev cmake
12+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ci/travis_linux_install; fi
13+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ci/travis_osx_install; fi
1214
script:
13-
- export CC=clang-4.0
14-
- export CXX=clang++-4.0
15-
- which $CC
16-
- which $CXX
17-
- echo $PATH
18-
- mkdir build
19-
- cd build
20-
- cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd) -DZIG_LIBC_LIB_DIR=$(dirname $($CC -print-file-name=crt1.o)) -DZIG_LIBC_INCLUDE_DIR=$(echo -n | $CC -E -x c - -v 2>&1 | grep -B1 "End of search list." | head -n1 | cut -c 2- | sed "s/ .*//") -DZIG_LIBC_STATIC_LIB_DIR=$(dirname $($CC -print-file-name=crtbegin.o))
21-
- make VERBOSE=1
22-
- make install
23-
- ./zig build --build-file ../build.zig test
15+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ci/travis_linux_script; fi
16+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ci/travis_osx_script; fi

CMakeLists.txt

Lines changed: 136 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ set(ZIG_EACH_LIB_RPATH off CACHE BOOL "Add each dynamic library to rpath for nat
2222

2323
option(ZIG_TEST_COVERAGE "Build Zig with test coverage instrumentation" OFF)
2424

25+
# To see what patches have been applied to LLD in this repository:
26+
# git log -p -- deps/lld
27+
option(ZIG_FORCE_EXTERNAL_LLD "If your system has the LLD patches use it instead of the embedded LLD" OFF)
2528

2629

2730
find_package(llvm)
@@ -31,8 +34,137 @@ link_directories(${LLVM_LIBDIRS})
3134
find_package(clang)
3235
include_directories(${CLANG_INCLUDE_DIRS})
3336

34-
find_package(lld)
35-
include_directories(${LLD_INCLUDE_DIRS})
37+
if(ZIG_FORCE_EXTERNAL_LLD)
38+
find_package(lld)
39+
include_directories(${LLD_INCLUDE_DIRS})
40+
else()
41+
set(EMBEDDED_LLD_LIB_SOURCES
42+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/Driver/DarwinLdDriver.cpp"
43+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/Config/Version.cpp"
44+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp"
45+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/LayoutPass.cpp"
46+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ArchHandler.cpp"
47+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp"
48+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ObjCPass.cpp"
49+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp"
50+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp"
51+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp"
52+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/TLVPass.cpp"
53+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp"
54+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/GOTPass.cpp"
55+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ArchHandler_x86.cpp"
56+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp"
57+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp"
58+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp"
59+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ShimPass.cpp"
60+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/WriterMachO.cpp"
61+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/StubsPass.cpp"
62+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ArchHandler_arm.cpp"
63+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp"
64+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/FileArchive.cpp"
65+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/TargetOptionsCommandFlags.cpp"
66+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/File.cpp"
67+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/Error.cpp"
68+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/SymbolTable.cpp"
69+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/Reader.cpp"
70+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/Reproduce.cpp"
71+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/Writer.cpp"
72+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/LinkingContext.cpp"
73+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/Resolver.cpp"
74+
"${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/DefinedAtom.cpp"
75+
)
76+
set(EMBEDDED_LLD_ELF_SOURCES
77+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/ScriptLexer.cpp"
78+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/AMDGPU.cpp"
79+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/PPC.cpp"
80+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/ARM.cpp"
81+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/AVR.cpp"
82+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/SPARCV9.cpp"
83+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/Mips.cpp"
84+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/AArch64.cpp"
85+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/X86_64.cpp"
86+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/PPC64.cpp"
87+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/MipsArchTree.cpp"
88+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/X86.cpp"
89+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/GdbIndex.cpp"
90+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/Driver.cpp"
91+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/Relocations.cpp"
92+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/Error.cpp"
93+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/LTO.cpp"
94+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/Strings.cpp"
95+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/ScriptParser.cpp"
96+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/MarkLive.cpp"
97+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/SyntheticSections.cpp"
98+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/SymbolTable.cpp"
99+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/LinkerScript.cpp"
100+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/EhFrame.cpp"
101+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/Target.cpp"
102+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/Filesystem.cpp"
103+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/OutputSections.cpp"
104+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/Symbols.cpp"
105+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/ICF.cpp"
106+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/InputFiles.cpp"
107+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/Thunks.cpp"
108+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/DriverUtils.cpp"
109+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/Writer.cpp"
110+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/InputSection.cpp"
111+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF/MapFile.cpp"
112+
)
113+
set(EMBEDDED_LLD_COFF_SOURCES
114+
"${CMAKE_SOURCE_DIR}/deps/lld/COFF/DLL.cpp"
115+
"${CMAKE_SOURCE_DIR}/deps/lld/COFF/Driver.cpp"
116+
"${CMAKE_SOURCE_DIR}/deps/lld/COFF/Chunks.cpp"
117+
"${CMAKE_SOURCE_DIR}/deps/lld/COFF/PDB.cpp"
118+
"${CMAKE_SOURCE_DIR}/deps/lld/COFF/Error.cpp"
119+
"${CMAKE_SOURCE_DIR}/deps/lld/COFF/LTO.cpp"
120+
"${CMAKE_SOURCE_DIR}/deps/lld/COFF/Strings.cpp"
121+
"${CMAKE_SOURCE_DIR}/deps/lld/COFF/MarkLive.cpp"
122+
"${CMAKE_SOURCE_DIR}/deps/lld/COFF/SymbolTable.cpp"
123+
"${CMAKE_SOURCE_DIR}/deps/lld/COFF/Symbols.cpp"
124+
"${CMAKE_SOURCE_DIR}/deps/lld/COFF/ICF.cpp"
125+
"${CMAKE_SOURCE_DIR}/deps/lld/COFF/InputFiles.cpp"
126+
"${CMAKE_SOURCE_DIR}/deps/lld/COFF/DriverUtils.cpp"
127+
"${CMAKE_SOURCE_DIR}/deps/lld/COFF/Writer.cpp"
128+
"${CMAKE_SOURCE_DIR}/deps/lld/COFF/MapFile.cpp"
129+
)
130+
add_library(embedded_lld_lib ${EMBEDDED_LLD_LIB_SOURCES})
131+
add_library(embedded_lld_elf ${EMBEDDED_LLD_ELF_SOURCES})
132+
add_library(embedded_lld_coff ${EMBEDDED_LLD_COFF_SOURCES})
133+
set_target_properties(embedded_lld_lib PROPERTIES
134+
COMPILE_FLAGS "-std=c++11 -fno-exceptions -fno-rtti -Wno-comment"
135+
LINK_FLAGS " "
136+
)
137+
set_target_properties(embedded_lld_elf PROPERTIES
138+
COMPILE_FLAGS "-std=c++11 -fno-exceptions -fno-rtti -Wno-comment"
139+
LINK_FLAGS " "
140+
)
141+
set_target_properties(embedded_lld_coff PROPERTIES
142+
COMPILE_FLAGS "-std=c++11 -fno-exceptions -fno-rtti -Wno-comment"
143+
LINK_FLAGS " "
144+
)
145+
target_include_directories(embedded_lld_lib PUBLIC
146+
"${CMAKE_SOURCE_DIR}/deps/lld/include"
147+
"${CMAKE_SOURCE_DIR}/deps/lld-prebuilt"
148+
)
149+
target_include_directories(embedded_lld_elf PUBLIC
150+
"${CMAKE_SOURCE_DIR}/deps/lld/ELF"
151+
"${CMAKE_SOURCE_DIR}/deps/lld/include"
152+
"${CMAKE_SOURCE_DIR}/deps/lld-prebuilt/ELF"
153+
"${CMAKE_SOURCE_DIR}/deps/lld-prebuilt"
154+
)
155+
target_include_directories(embedded_lld_coff PUBLIC
156+
"${CMAKE_SOURCE_DIR}/deps/lld/COFF"
157+
"${CMAKE_SOURCE_DIR}/deps/lld/include"
158+
"${CMAKE_SOURCE_DIR}/deps/lld-prebuilt/COFF"
159+
"${CMAKE_SOURCE_DIR}/deps/lld-prebuilt"
160+
)
161+
set(LLD_INCLUDE_DIRS "")
162+
set(LLD_LIBRARIES
163+
embedded_lld_elf
164+
embedded_lld_coff
165+
embedded_lld_lib
166+
)
167+
endif()
36168

37169
find_package(Threads)
38170

@@ -65,26 +197,6 @@ set(ZIG_SOURCES
65197
"${CMAKE_SOURCE_DIR}/src/zig_llvm.cpp"
66198
)
67199

68-
set(ZIG_HOST_LINK_VERSION)
69-
if (APPLE)
70-
set(LD_V_OUTPUT)
71-
execute_process(
72-
COMMAND sh -c "${CMAKE_LINKER} -v 2>&1 | head -1"
73-
RESULT_VARIABLE HAD_ERROR
74-
OUTPUT_VARIABLE LD_V_OUTPUT
75-
)
76-
if (NOT HAD_ERROR)
77-
if ("${LD_V_OUTPUT}" MATCHES ".*ld64-([0-9.]+).*")
78-
string(REGEX REPLACE ".*ld64-([0-9.]+).*" "\\1" ZIG_HOST_LINK_VERSION ${LD_V_OUTPUT})
79-
elseif ("${LD_V_OUTPUT}" MATCHES "[^0-9]*([0-9.]+).*")
80-
string(REGEX REPLACE "[^0-9]*([0-9.]+).*" "\\1" ZIG_HOST_LINK_VERSION ${LD_V_OUTPUT})
81-
endif()
82-
else()
83-
message(FATAL_ERROR "${CMAKE_LINKER} failed with status ${HAD_ERROR}")
84-
endif()
85-
endif()
86-
87-
88200
set(C_HEADERS_DEST "lib/zig/include")
89201
set(ZIG_STD_DEST "lib/zig/std")
90202
set(CONFIGURE_OUT_FILE "${CMAKE_BINARY_DIR}/config.h")
@@ -297,10 +409,10 @@ install(FILES "${CMAKE_SOURCE_DIR}/std/mem.zig" DESTINATION "${ZIG_STD_DEST}")
297409
install(FILES "${CMAKE_SOURCE_DIR}/std/net.zig" DESTINATION "${ZIG_STD_DEST}")
298410
install(FILES "${CMAKE_SOURCE_DIR}/std/os/child_process.zig" DESTINATION "${ZIG_STD_DEST}/os")
299411
install(FILES "${CMAKE_SOURCE_DIR}/std/os/darwin.zig" DESTINATION "${ZIG_STD_DEST}/os")
300-
install(FILES "${CMAKE_SOURCE_DIR}/std/os/darwin_x86_64.zig" DESTINATION "${ZIG_STD_DEST}/os")
301-
install(FILES "${CMAKE_SOURCE_DIR}/std/os/errno.zig" DESTINATION "${ZIG_STD_DEST}/os")
412+
install(FILES "${CMAKE_SOURCE_DIR}/std/os/darwin_errno.zig" DESTINATION "${ZIG_STD_DEST}/os")
302413
install(FILES "${CMAKE_SOURCE_DIR}/std/os/index.zig" DESTINATION "${ZIG_STD_DEST}/os")
303414
install(FILES "${CMAKE_SOURCE_DIR}/std/os/linux.zig" DESTINATION "${ZIG_STD_DEST}/os")
415+
install(FILES "${CMAKE_SOURCE_DIR}/std/os/linux_errno.zig" DESTINATION "${ZIG_STD_DEST}/os")
304416
install(FILES "${CMAKE_SOURCE_DIR}/std/os/linux_i386.zig" DESTINATION "${ZIG_STD_DEST}/os")
305417
install(FILES "${CMAKE_SOURCE_DIR}/std/os/linux_x86_64.zig" DESTINATION "${ZIG_STD_DEST}/os")
306418
install(FILES "${CMAKE_SOURCE_DIR}/std/os/path.zig" DESTINATION "${ZIG_STD_DEST}/os")

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ the Zig compiler itself:
7676
These libraries must be installed on your system, with the development files
7777
available. The Zig compiler links against them.
7878

79-
* LLVM, Clang, and LLD libraries == 4.x
79+
* LLVM, Clang, and LLD libraries == 5.x
8080

8181
### Debug / Development Build
8282

ci/travis_linux_before_install

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
3+
set -x
4+
5+
sudo sh -c 'echo "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-5.0 main" >> /etc/apt/sources.list'
6+
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
7+
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
8+
sudo apt-get update -q

ci/travis_linux_install

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
set -x
4+
5+
sudo apt-get remove -y llvm-*
6+
sudo rm -rf /usr/local/*
7+
sudo apt-get install -y clang-5.0 libclang-5.0 libclang-5.0-dev llvm-5.0 llvm-5.0-dev liblld-5.0 liblld-5.0-dev cmake

ci/travis_linux_script

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
3+
set -x
4+
5+
export CC=clang-5.0
6+
export CXX=clang++-5.0
7+
which $CC
8+
which $CXX
9+
echo $PATH
10+
mkdir build
11+
cd build
12+
cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd) -DZIG_LIBC_LIB_DIR=$(dirname $($CC -print-file-name=crt1.o)) -DZIG_LIBC_INCLUDE_DIR=$(echo -n | $CC -E -x c - -v 2>&1 | grep -B1 "End of search list." | head -n1 | cut -c 2- | sed "s/ .*//") -DZIG_LIBC_STATIC_LIB_DIR=$(dirname $($CC -print-file-name=crtbegin.o)) -DZIG_FORCE_EXTERNAL_LLD=ON
13+
make VERBOSE=1
14+
make install
15+
./zig build --build-file ../build.zig test

ci/travis_osx_before_install

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
set -x
4+
5+
brew update

ci/travis_osx_install

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/sh
2+
3+
set -x
4+
5+
brew install gcc@7
6+
brew outdated gcc@7 || brew upgrade gcc@7
7+
brew link --overwrite gcc@7
8+
9+
SRC_DIR=$(pwd)
10+
PREFIX_DIR=$HOME/local/llvm5
11+
export CC=/usr/local/opt/gcc/bin/gcc-7
12+
export CXX=/usr/local/opt/gcc/bin/g++-7
13+
14+
mkdir -p $HOME/local
15+
cd $HOME/local
16+
wget http://s3.amazonaws.com/superjoe/temp/llvm5.tar.xz
17+
tar xfp llvm5.tar.xz
18+
19+
cd $SRC_DIR

ci/travis_osx_script

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
3+
set -x
4+
5+
PREFIX_DIR=$HOME/local/llvm5
6+
export CC=/usr/local/opt/gcc/bin/gcc-7
7+
export CXX=/usr/local/opt/gcc/bin/g++-7
8+
9+
echo $PATH
10+
mkdir build
11+
cd build
12+
cmake .. -DCMAKE_PREFIX_PATH=$PREFIX_DIR -DCMAKE_INSTALL_PREFIX=$(pwd) -DZIG_LIBC_LIB_DIR=$(dirname $($CC -print-file-name=crt1.o)) -DZIG_LIBC_INCLUDE_DIR=$(echo -n | $CC -E -x c - -v 2>&1 | grep -B1 "End of search list." | head -n1 | cut -c 2- | sed "s/ .*//") -DZIG_LIBC_STATIC_LIB_DIR=$(dirname $($CC -print-file-name=crtbegin.o)) -DZIG_FORCE_EXTERNAL_LLD=ON
13+
make VERBOSE=1
14+
make install
15+
./zig build --build-file ../build.zig test

cmake/Findclang.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88

99
find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h
1010
PATHS
11-
/usr/lib/llvm-4.0/include
11+
/usr/lib/llvm-5.0/include
1212
/mingw64/include)
1313

1414
macro(FIND_AND_ADD_CLANG_LIB _libname_)
1515
string(TOUPPER ${_libname_} _prettylibname_)
1616
find_library(CLANG_${_prettylibname_}_LIB NAMES ${_libname_}
1717
PATHS
18-
/usr/lib/llvm-4.0/lib
18+
/usr/lib/llvm-5.0/lib
1919
/mingw64/lib
2020
/c/msys64/mingw64/lib
2121
c:\\msys64\\mingw64\\lib)

cmake/Findlld.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88

99
find_path(LLD_INCLUDE_DIRS NAMES lld/Driver/Driver.h
1010
PATHS
11-
/usr/lib/llvm-4.0/include
11+
/usr/lib/llvm-5.0/include
1212
/mingw64/include)
1313

14-
find_library(LLD_LIBRARY NAMES lld-4.0 lld PATHS /usr/lib/llvm-4.0/lib)
14+
find_library(LLD_LIBRARY NAMES lld-5.0 lld PATHS /usr/lib/llvm-5.0/lib)
1515
if(EXISTS ${LLD_LIBRARY})
1616
set(LLD_LIBRARIES ${LLD_LIBRARY})
1717
else()
1818
macro(FIND_AND_ADD_LLD_LIB _libname_)
1919
string(TOUPPER ${_libname_} _prettylibname_)
2020
find_library(LLD_${_prettylibname_}_LIB NAMES ${_libname_}
2121
PATHS
22-
/usr/lib/llvm-4.0/lib
22+
/usr/lib/llvm-5.0/lib
2323
/mingw64/lib
2424
/c/msys64/mingw64/lib
2525
c:/msys64/mingw64/lib)

cmake/Findllvm.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
# LLVM_LIBDIRS
99

1010
find_program(LLVM_CONFIG_EXE
11-
NAMES llvm-config llvm-config-4.0
11+
NAMES llvm-config llvm-config-5.0
1212
PATHS
1313
"/mingw64/bin"
1414
"/c/msys64/mingw64/bin"
1515
"c:/msys64/mingw64/bin"
16-
"C:/Libraries/llvm-4.0.0/bin")
16+
"C:/Libraries/llvm-5.0.0/bin")
1717

1818
execute_process(
1919
COMMAND ${LLVM_CONFIG_EXE} --libs

0 commit comments

Comments
 (0)