mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-10-19 19:50:14 +00:00
* Generate libunwind-13 & libunwind-13-dev packages
* Add the following option to the libc++ build: -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON -DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON -DLIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY=OFF to address upstream bug 46321 * Make libc++abi use libunwind * d/rules: Adjust cmake defines to fix libclc.pc paths * Add the following option to the libc++ build: -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON -DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON -DLIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY=OFF to address upstream bug 46321 * Build libunwind * Add riscv64 architecture in control enable liblldb, libomp and others which are currently unavailable in riscv64 repository. * Add libxml2 as a dependency as it is necessary for llvm manifest tool (llvm-mt) (Closes: #990537) * d/rules: Adjust cmake defines to fix libclc.pc paths
This commit is contained in:
commit
df0335094d
30
debian/changelog
vendored
30
debian/changelog
vendored
@ -76,6 +76,14 @@ llvm-toolchain-snapshot (1:13~++20210129063721+010b176cdefb-1~exp1) experimental
|
||||
|
||||
llvm-toolchain-12 (1:12.0.1-2) unstable; urgency=medium
|
||||
|
||||
* Generate libunwind-12 & libunwind-12-dev packages
|
||||
* Add the following option to the libc++ build:
|
||||
-DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON
|
||||
-DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON
|
||||
-DLIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY=OFF
|
||||
to address upstream bug 46321
|
||||
* Make libc++abi use libunwind
|
||||
|
||||
[ Kasper Kantz ]
|
||||
* Add riscv64 architecture in control
|
||||
enable liblldb, libomp and others which are
|
||||
@ -86,6 +94,28 @@ llvm-toolchain-12 (1:12.0.1-2) unstable; urgency=medium
|
||||
for llvm manifest tool (llvm-mt)
|
||||
(Closes: #990537)
|
||||
|
||||
[ Jordan Justen ]
|
||||
* d/rules: Adjust cmake defines to fix libclc.pc paths
|
||||
* Add the following option to the libc++ build:
|
||||
-DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON
|
||||
-DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON
|
||||
-DLIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY=OFF
|
||||
to address upstream bug 46321
|
||||
* Build libunwind
|
||||
|
||||
[ Kasper Kantz ]
|
||||
* Add riscv64 architecture in control
|
||||
enable liblldb, libomp and others which are
|
||||
currently unavailable in riscv64 repository.
|
||||
|
||||
[ Krzysztof Aleksander Pyrkosz ]
|
||||
* Add libxml2 as a dependency as it is necessary
|
||||
for llvm manifest tool (llvm-mt)
|
||||
(Closes: #990537)
|
||||
|
||||
[ Jordan Justen ]
|
||||
* d/rules: Adjust cmake defines to fix libclc.pc paths
|
||||
|
||||
-- Sylvestre Ledru <sylvestre@debian.org> Mon, 12 Jul 2021 08:19:59 +0200
|
||||
|
||||
llvm-toolchain-12 (1:12.0.1-1) unstable; urgency=medium
|
||||
|
37
debian/control
vendored
37
debian/control
vendored
@ -712,3 +712,40 @@ Description: OpenCL C language implementation - development files
|
||||
as specified by the OpenCL 1.1 Specification.
|
||||
.
|
||||
This package contains development header files.
|
||||
|
||||
# ------------- libunwind -------------
|
||||
|
||||
Package: libunwind-13
|
||||
Section: libs
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends}
|
||||
Provides: libunwind-x.y
|
||||
Conflicts: libunwind-x.y
|
||||
Replaces: libunwind-x.y
|
||||
Description: production-quality unwinder
|
||||
libunwind is a production-quality unwinder, with platform support for DWARF
|
||||
unwind info, SjLj, and ARM EHABI.
|
||||
.
|
||||
The low level libunwind API was designed to work either in-process (aka local)
|
||||
or to operate on another process (aka remote), but only the local path has
|
||||
been implemented. Remote unwinding remains as future work.
|
||||
|
||||
Package: libunwind-13-dev
|
||||
Section: libdevel
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Depends:
|
||||
${misc:Depends},
|
||||
Breaks: libunwind-dev
|
||||
Provides: libunwind-x.y-dev
|
||||
Conflicts: libunwind-x.y-dev
|
||||
Replaces: libunwind-dev, libunwind-x.y-dev
|
||||
Description: production-quality unwinder
|
||||
libunwind is a production-quality unwinder, with platform support for DWARF
|
||||
unwind info, SjLj, and ARM EHABI.
|
||||
.
|
||||
The low level libunwind API was designed to work either in-process (aka local)
|
||||
or to operate on another process (aka remote), but only the local path has
|
||||
been implemented. Remote unwinding remains as future work.
|
||||
|
4
debian/libunwind-X.Y-dev.install.in
vendored
Normal file
4
debian/libunwind-X.Y-dev.install.in
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
usr/lib/llvm-@LLVM_VERSION@/lib/libunwind.so
|
||||
usr/lib/llvm-@LLVM_VERSION@/lib/libunwind.a
|
||||
usr/include/libunwind
|
||||
|
2
debian/libunwind-X.Y-dev.links.in
vendored
Normal file
2
debian/libunwind-X.Y-dev.links.in
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
usr/lib/llvm-@LLVM_VERSION@/lib/libunwind.so /usr/lib/x86_64-linux-gnu/libunwind.so
|
||||
usr/lib/llvm-@LLVM_VERSION@/lib/libunwind.a /usr/lib/x86_64-linux-gnu/libunwind.a
|
1
debian/libunwind-X.Y-dev.lintian-overrides.in
vendored
Normal file
1
debian/libunwind-X.Y-dev.lintian-overrides.in
vendored
Normal file
@ -0,0 +1 @@
|
||||
libunwind-@LLVM_VERSION@-dev: arch-dependent-file-not-in-arch-specific-directory usr/lib/llvm-@LLVM_VERSION@/lib/libunwind.a
|
1
debian/libunwind-X.Y.install.in
vendored
Normal file
1
debian/libunwind-X.Y.install.in
vendored
Normal file
@ -0,0 +1 @@
|
||||
usr/lib/llvm-@LLVM_VERSION@/lib/libunwind.so.*
|
2
debian/libunwind-X.Y.links.in
vendored
Normal file
2
debian/libunwind-X.Y.links.in
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
usr/lib/llvm-@LLVM_VERSION@/lib/libunwind.so.1.0 /usr/lib/@DEB_HOST_MULTIARCH@/libunwind.so.1.0
|
||||
usr/lib/@DEB_HOST_MULTIARCH@/libunwind.so.1.0 /usr/lib/@DEB_HOST_MULTIARCH@/libunwind.so.1
|
1
debian/libunwind-X.Y.lintian-overrides.in
vendored
Normal file
1
debian/libunwind-X.Y.lintian-overrides.in
vendored
Normal file
@ -0,0 +1 @@
|
||||
libunwind-@LLVM_VERSION@: arch-dependent-file-not-in-arch-specific-directory usr/lib/llvm-@LLVM_VERSION@/lib/libunwind.so.1.0
|
134
debian/qualify-clang.sh
vendored
134
debian/qualify-clang.sh
vendored
@ -9,7 +9,7 @@ VERSION=$(dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9]+).*,\1,p")
|
||||
DETAILED_VERSION=$(dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9.]+)(~|-)(.*),\1\2\3,p")
|
||||
DEB_HOST_ARCH=$(dpkg-architecture -qDEB_HOST_ARCH)
|
||||
|
||||
LIST="libomp5-${VERSION}_${DETAILED_VERSION}_amd64.deb libomp-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb python3-lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb libllvm${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang1-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-common-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-runtime_${DETAILED_VERSION}_amd64.deb lld-${VERSION}_${DETAILED_VERSION}_amd64.deb libfuzzer-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++abi-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++1-${VERSION}_${DETAILED_VERSION}_amd64.deb libc++abi1-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-tools_${DETAILED_VERSION}_amd64.deb clang-tools-${VERSION}_${DETAILED_VERSION}_amd64.deb clangd-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-cpp${VERSION}_${DETAILED_VERSION}_amd64.deb clang-tidy-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-cpp${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclc-${VERSION}_${DETAILED_VERSION}_all.deb libclc-${VERSION}-dev_${DETAILED_VERSION}_all.deb llvm-${VERSION}-linker-tools_${DETAILED_VERSION}_amd64.deb"
|
||||
LIST="libomp5-${VERSION}_${DETAILED_VERSION}_amd64.deb libomp-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb python3-lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb libllvm${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang1-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-common-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-runtime_${DETAILED_VERSION}_amd64.deb lld-${VERSION}_${DETAILED_VERSION}_amd64.deb libfuzzer-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++abi-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++1-${VERSION}_${DETAILED_VERSION}_amd64.deb libc++abi1-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-tools_${DETAILED_VERSION}_amd64.deb clang-tools-${VERSION}_${DETAILED_VERSION}_amd64.deb clangd-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-cpp${VERSION}_${DETAILED_VERSION}_amd64.deb clang-tidy-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-cpp${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclc-${VERSION}_${DETAILED_VERSION}_all.deb libclc-${VERSION}-dev_${DETAILED_VERSION}_all.deb llvm-${VERSION}-linker-tools_${DETAILED_VERSION}_amd64.deb libunwind-${VERSION}_${DETAILED_VERSION}_all.deb libunwind-${VERSION}-dev_${DETAILED_VERSION}_all.deb"
|
||||
echo "To install everything:"
|
||||
echo "sudo apt --purge remove 'libomp5-*' 'libc++*dev' 'libc++*' 'python3-lldb-*' 'libclc-*' 'libclc-*dev'"
|
||||
echo "sudo dpkg -i $LIST"
|
||||
@ -939,6 +939,21 @@ clang++-$VERSION -std=c++11 -stdlib=libc++ foo.cpp -o o
|
||||
clang++-$VERSION -std=c++14 -stdlib=libc++ foo.cpp -lc++experimental -o o
|
||||
./o > /dev/null
|
||||
|
||||
# Bug 46321
|
||||
cat > test.cpp << EOF
|
||||
#include <iostream>
|
||||
int main() {
|
||||
std::cout << "Hello World!" << std::endl;
|
||||
}
|
||||
EOF
|
||||
clang++-$VERSION -stdlib=libc++ -unwindlib=libunwind -rtlib=compiler-rt -static-libstdc++ -static-libgcc test.cpp &> /dev/null || true
|
||||
|
||||
clang++-$VERSION -stdlib=libc++ -static-libstdc++ -fuse-ld=lld -l:libc++abi.a test.cpp -o test
|
||||
./test
|
||||
|
||||
clang++-$VERSION -stdlib=libc++ -nostdlib++ test.cpp -l:libc++.a -l:libc++abi.a -pthread -o test
|
||||
./test
|
||||
|
||||
# Bug 889832
|
||||
echo '#include <iostream>
|
||||
int main() {}' | clang++-$VERSION -std=c++1z -x c++ -stdlib=libc++ -
|
||||
@ -1030,6 +1045,123 @@ fi
|
||||
|
||||
LLVM_CONFIG=llvm-config-$VERSION /usr/lib/llvm-$VERSION/share/libclc/check_external_calls.sh /usr/lib/clc/amdgcn--amdhsa.bc > /dev/null
|
||||
|
||||
# libunwind
|
||||
echo "Testing libunwind-$VERSION-dev ..."
|
||||
|
||||
if test ! -f /usr/include/libunwind/unwind.h; then
|
||||
echo "Install libunwind-$VERSION-dev";
|
||||
exit -1;
|
||||
fi
|
||||
echo '
|
||||
#include <libunwind.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void backtrace(int lower_bound) {
|
||||
unw_context_t context;
|
||||
unw_getcontext(&context);
|
||||
|
||||
unw_cursor_t cursor;
|
||||
unw_init_local(&cursor, &context);
|
||||
|
||||
int n = 0;
|
||||
do {
|
||||
++n;
|
||||
if (n > 100) {
|
||||
abort();
|
||||
}
|
||||
} while (unw_step(&cursor) > 0);
|
||||
|
||||
if (n < lower_bound) {
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
void test1(int i) {
|
||||
backtrace(i);
|
||||
}
|
||||
|
||||
void test2(int i, int j) {
|
||||
backtrace(i);
|
||||
test1(j);
|
||||
}
|
||||
|
||||
void test3(int i, int j, int k) {
|
||||
backtrace(i);
|
||||
test2(j, k);
|
||||
}
|
||||
|
||||
void test_no_info() {
|
||||
unw_context_t context;
|
||||
unw_getcontext(&context);
|
||||
|
||||
unw_cursor_t cursor;
|
||||
unw_init_local(&cursor, &context);
|
||||
|
||||
unw_proc_info_t info;
|
||||
int ret = unw_get_proc_info(&cursor, &info);
|
||||
if (ret != UNW_ESUCCESS)
|
||||
abort();
|
||||
|
||||
// Set the IP to an address clearly outside any function.
|
||||
unw_set_reg(&cursor, UNW_REG_IP, (unw_word_t)0);
|
||||
|
||||
ret = unw_get_proc_info(&cursor, &info);
|
||||
if (ret != UNW_ENOINFO)
|
||||
abort();
|
||||
}
|
||||
|
||||
int main(int, char**) {
|
||||
test1(1);
|
||||
test2(1, 2);
|
||||
test3(1, 2, 3);
|
||||
test_no_info();
|
||||
return 0;
|
||||
}'> foo.cpp
|
||||
clang++-$VERSION foo.cpp -lunwind -ldl -I /usr/include/libunwind
|
||||
./a.out
|
||||
clang++-$VERSION foo.cpp -unwindlib=libunwind -rtlib=compiler-rt -I/usr/include/libunwind
|
||||
./a.out
|
||||
|
||||
echo '
|
||||
#include <assert.h>
|
||||
#include <dlfcn.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <unwind.h>
|
||||
|
||||
_Unwind_Reason_Code frame_handler(struct _Unwind_Context* ctx, void* arg) {
|
||||
(void)arg;
|
||||
Dl_info info = { 0, 0, 0, 0 };
|
||||
|
||||
// Unwind util the main is reached, above frames depend on the platform and
|
||||
// architecture.
|
||||
if (dladdr(reinterpret_cast<void *>(_Unwind_GetIP(ctx)), &info) &&
|
||||
info.dli_sname && !strcmp("main", info.dli_sname)) {
|
||||
_Exit(0);
|
||||
}
|
||||
return _URC_NO_REASON;
|
||||
}
|
||||
|
||||
void signal_handler(int signum) {
|
||||
(void)signum;
|
||||
_Unwind_Backtrace(frame_handler, NULL);
|
||||
_Exit(-1);
|
||||
}
|
||||
|
||||
int main(int, char**) {
|
||||
signal(SIGUSR1, signal_handler);
|
||||
kill(getpid(), SIGUSR1);
|
||||
return -2;
|
||||
}
|
||||
'> foo.cpp
|
||||
clang++-$VERSION foo.cpp /usr/lib/llvm-$VERSION/lib/libunwind.a -I/usr/include/libunwind/ -lpthread -ldl
|
||||
./a.out||true
|
||||
clang++-$VERSION foo.cpp -unwindlib=libunwind -rtlib=compiler-rt -I/usr/include/libunwind -ldl
|
||||
./a.out||true
|
||||
|
||||
if test ! -f /usr/lib/llvm-$VERSION/include/polly/LinkAllPasses.h; then
|
||||
echo "Install libclang-common-$VERSION-dev for polly";
|
||||
|
18
debian/rules
vendored
18
debian/rules
vendored
@ -1,8 +1,7 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
# polly, openmp & lldb aren't enabled for every platform
|
||||
PROJECTS = clang;clang-tools-extra;libcxx;libcxxabi;compiler-rt;lld;debuginfo-tests
|
||||
#;mlir
|
||||
PROJECTS = clang;clang-tools-extra;libcxx;libcxxabi;compiler-rt;lld;debuginfo-tests;libunwind
|
||||
|
||||
TARGET_BUILD := build-llvm
|
||||
TARGET_BUILD_STAGE2 := $(TARGET_BUILD)/tools/clang/stage2-bins
|
||||
@ -402,6 +401,7 @@ override_dh_auto_configure: preconfigure
|
||||
-DCLANG_LINK_CLANG_DYLIB=ON \
|
||||
-DENABLE_LINKER_BUILD_ID=ON \
|
||||
-DCOMPILER_RT_USE_LIBCXX=NO \
|
||||
-DLIBUNWIND_USE_COMPILER_RT=ON \
|
||||
$(Z3_FLAG) \
|
||||
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="AVR;M68k" \
|
||||
-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \
|
||||
@ -411,7 +411,7 @@ override_dh_auto_configure: preconfigure
|
||||
-DLLVM_POLLY_LINK_INTO_TOOLS=ON \
|
||||
-DBOOTSTRAP_CMAKE_CXX_FLAGS='$(BOOTSTRAP_CXXFLAGS_EXTRA)' \
|
||||
-DBOOTSTRAP_CMAKE_C_FLAGS='$(BOOTSTRAP_CFLAGS_EXTRA)' \
|
||||
-DCLANG_BOOTSTRAP_PASSTHROUGH="CMAKE_INSTALL_PREFIX;CMAKE_VERBOSE_MAKEFILE;CMAKE_BUILD_TYPE;CMAKE_CXX_FLAGS_RELWITHDEBINFO;LLVM_LINK_LLVM_DYLIB;LLVM_INSTALL_UTILS;LLVM_VERSION_SUFFIX;LLVM_ENABLE_SPHINX;SPHINX_WARNINGS_AS_ERRORS;LLVM_BUILD_LLVM_DYLIB;LLVM_ENABLE_RTTI;LLVM_ENABLE_FFI;LIBCLANG_LIBRARY_VERSION;ENABLE_LINKER_BUILD_ID;POLLY_BUNDLED_JSONCPP;LLVM_EXPERIMENTAL_TARGETS_TO_BUILD;LLVM_USE_PERF;LLVM_ENABLE_ASSERTIONS;LLVM_BINUTILS_INCDIR;LLVM_HOST_TRIPLE;LLVM_COMPILER_CHECKED;COMPILER_RT_BUILD_BUILTINS;LIBOMP_LIBFLAGS;CMAKE_SHARED_LINKER_FLAGS;PYTHON_EXECUTABLE;LLVM_ENABLE_Z3_SOLVER;LLVM_POLLY_LINK_INTO_TOOLS;CLANG_VENDOR" || tail -100 build-llvm/CMakeFiles/CMakeError.log
|
||||
-DCLANG_BOOTSTRAP_PASSTHROUGH="CMAKE_INSTALL_PREFIX;CMAKE_VERBOSE_MAKEFILE;CMAKE_BUILD_TYPE;CMAKE_CXX_FLAGS_RELWITHDEBINFO;LLVM_LINK_LLVM_DYLIB;LLVM_INSTALL_UTILS;LLVM_VERSION_SUFFIX;LLVM_ENABLE_SPHINX;SPHINX_WARNINGS_AS_ERRORS;LLVM_BUILD_LLVM_DYLIB;LLVM_ENABLE_RTTI;LLVM_ENABLE_FFI;LIBCLANG_LIBRARY_VERSION;ENABLE_LINKER_BUILD_ID;POLLY_BUNDLED_JSONCPP;LLVM_EXPERIMENTAL_TARGETS_TO_BUILD;LLVM_USE_PERF;LLVM_ENABLE_ASSERTIONS;LLVM_BINUTILS_INCDIR;LLVM_HOST_TRIPLE;LLVM_COMPILER_CHECKED;COMPILER_RT_BUILD_BUILTINS;LIBOMP_LIBFLAGS;CMAKE_SHARED_LINKER_FLAGS;PYTHON_EXECUTABLE;LLVM_ENABLE_Z3_SOLVER;LLVM_POLLY_LINK_INTO_TOOLS;CLANG_VENDOR;LIBUNWIND_USE_COMPILER_RT" || tail -100 build-llvm/CMakeFiles/CMakeError.log
|
||||
FOUND_VERSION=`grep LLVM_VERSION_STRING build-llvm/include/llvm/Config/llvm-config.h|cut -d\" -f2`; \
|
||||
if ! echo "$(LLVM_VERSION_FULL)"|grep "$$FOUND_VERSION"; then \
|
||||
echo "mistmatch of version. Found: $$FOUND_VERSION / Expected: $(LLVM_VERSION_FULL)"; \
|
||||
@ -467,6 +467,10 @@ LIBCXX_CMAKE_OPTIONS := \
|
||||
-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \
|
||||
-DLIBCXX_USE_COMPILER_RT=YES \
|
||||
-DLIBCXXABI_USE_COMPILER_RT=YES \
|
||||
-DLIBCXXABI_USE_LLVM_UNWINDER=YES \
|
||||
-DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON \
|
||||
-DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON \
|
||||
-DLIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY=OFF \
|
||||
$(CMAKE_EXTRA) \
|
||||
$(CMAKE_EXTRA_LIBCXX)
|
||||
|
||||
@ -517,8 +521,9 @@ debian-libclc-build:
|
||||
echo "Using cmake: $$CMAKE_BIN"; \
|
||||
cd libclc/build && \
|
||||
$$CMAKE_BIN ../ \
|
||||
-DCMAKE_INSTALL_DATADIR=/usr/lib \
|
||||
-DCMAKE_INSTALL_INCLUDEDIR=/usr/include \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_DATADIR=lib \
|
||||
-DCMAKE_INSTALL_INCLUDEDIR=include \
|
||||
-DLLVM_CONFIG=$(CURDIR)/$(TARGET_BUILD_STAGE2)/bin/llvm-config \
|
||||
-DLIBCLC_TARGETS_TO_BUILD="amdgcn--;amdgcn--amdhsa;r600--;nvptx--;nvptx64--;nvptx--nvidiacl;nvptx64--nvidiacl"; \
|
||||
make $(NJOBS) $(VERBOSE)
|
||||
@ -612,6 +617,9 @@ override_dh_auto_install:
|
||||
cd debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/lib && rm -f libomp.so; \
|
||||
ln -s libomp.so.$(SONAME_OPENMP) libomp.so
|
||||
|
||||
mkdir -p debian/tmp/usr/include/libunwind
|
||||
cp -R libunwind/include/* debian/tmp/usr/include/libunwind/
|
||||
|
||||
if test "$(OPENMP_ENABLE)" = yes; then \
|
||||
mkdir -p debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/include/openmp; \
|
||||
cp -f openmp/runtime/exports/common*/include/* debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/include/openmp; \
|
||||
|
Loading…
Reference in New Issue
Block a user