Skip to content

Commit 986aa42

Browse files
committed
update cmake, update readme, in response to the dynamic linking fiasco
1 parent c026a9f commit 986aa42

File tree

3 files changed

+199
-186
lines changed

3 files changed

+199
-186
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,16 @@ brew install cmake llvm
5858
brew outdated llvm || brew upgrade llvm
5959
mkdir build
6060
cd build
61-
cmake .. -DCMAKE_PREFIX_PATH=$(brew --prefix llvm) -DZIG_PREFER_CLANG_CPP_DYLIB=ON
61+
cmake .. -DCMAKE_PREFIX_PATH=$(brew --prefix llvm)
6262
make install
6363
```
6464

65+
You will now run into this issue:
66+
[homebrew and llvm 10 packages in apt.llvm.org are broken with undefined reference to getPollyPluginInfo](https://github.com/ziglang/zig/issues/4799)
67+
68+
Please help upstream LLVM and Homebrew solve this issue, there is nothing Zig
69+
can do about it. See that issue for a workaround you can do in the meantime.
70+
6571
##### Windows
6672

6773
See https://github.com/ziglang/zig/wiki/Building-Zig-on-Windows

cmake/Findclang.cmake

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h
1818
)
1919

2020
if(ZIG_PREFER_CLANG_CPP_DYLIB)
21-
find_library(CLANG_CPP_DYLIB
21+
find_library(CLANG_LIBRARIES
2222
NAMES
2323
clang-cpp-10.0
2424
clang-cpp100
@@ -31,9 +31,7 @@ if(ZIG_PREFER_CLANG_CPP_DYLIB)
3131
)
3232
endif()
3333

34-
if(CLANG_CPP_DYLIB)
35-
set(CLANG_LIBRARIES ${CLANG_CPP_DYLIB})
36-
else()
34+
if(NOT CLANG_LIBRARIES)
3735
macro(FIND_AND_ADD_CLANG_LIB _libname_)
3836
string(TOUPPER ${_libname_} _prettylibname_)
3937
find_library(CLANG_${_prettylibname_}_LIB NAMES ${_libname_}

0 commit comments

Comments
 (0)