Skip to content

Commit 13d8ba8

Browse files
committed
Describe a known build issue in README.md
When we build opencl-clang on Ubuntu 16.04 Xenial with pre-built LLVM and pre-built SPIR-V library using GNU ld linker (binutils 2.26.1) we can see segmentaion fault at linking. This is probably a bug in the linker. The crash appears because '--gc-sections' linker option is added by add_link_opts function in AddLLVM.cmake. Cmake doesn't use this option if LLVM_NO_DEAD_STRIP is ON
1 parent 1ab6632 commit 13d8ba8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ Example:
110110
cmake -DLLVMSPIRV_INCLUDED_IN_LLVM=OFF -DSPIRV_TRANSLATOR_DIR=/path/to/installed/spirv/translator ../opencl-clang
111111
```
112112

113+
There is a known issue (linker crash) for this kind of build on Ubuntu 16.04 Xenial.
114+
In this case the following cmake option should fix it:
115+
```
116+
-DLLVM_NO_DEAD_STRIP=ON
117+
```
118+
113119
Installation directory of SPIR-V Translator is expected to contain the
114120
following files:
115121
```

0 commit comments

Comments
 (0)