Source code

Revision control

Copy as Markdown

Other Tools

Since LLVM 23 (llvm/llvm-project commit 0e02ccdaf010), llvm-c/lto.h includes llvm-c/Visibility.h,
which in turn includes llvm/Config/llvm-config.h. The configure macro copies lto.h and ExternC.h out
of the LLVM include directory instead of adding that directory to the include path, so copy those two
headers alongside them. Upstream: https://github.com/tpoechtrager/cctools-port/pull/192
--- a/cctools/m4/llvm.m4
+++ b/cctools/m4/llvm.m4
@@ -68,6 +68,12 @@
cp -f $LLVM_INCLUDE_DIR/llvm-c/ExternC.h `dirname ${0}`/include/llvm-c
fi
+ if test -e $LLVM_INCLUDE_DIR/llvm-c/Visibility.h; then
+ cp -f $LLVM_INCLUDE_DIR/llvm-c/Visibility.h `dirname ${0}`/include/llvm-c
+ mkdir -p `dirname ${0}`/include/llvm/Config
+ cp -f $LLVM_INCLUDE_DIR/llvm/Config/llvm-config.h `dirname ${0}`/include/llvm/Config
+ fi
+
LTO_DEF=-DLTO_SUPPORT
LTO_LIB="-L${LLVM_LIB_DIR} -lLTO"