Merge branch '12-libclc' into '12'

Build libclc. (Closes: #942709)

See merge request pkg-llvm-team/llvm-toolchain!67
This commit is contained in:
Sylvestre Ledru 2021-05-01 07:45:16 +00:00
commit f55a459007
6 changed files with 81 additions and 3 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
llvm-toolchain-12 (1:12.0.0-4) UNRELEASED; urgency=medium
* Build libclc. (Closes: #942709)
-- Timo Aaltonen <tjaalton@debian.org> Sat, 01 May 2021 01:01:52 +0300
llvm-toolchain-12 (1:12.0.0-3) unstable; urgency=medium
* Upload to unstable

37
debian/control vendored
View File

@ -674,3 +674,40 @@ Description: LLVM low level support for a standard C++ library (development file
.
* Correctness as defined by the C++ standards.
* Provide a portable sublayer to ease the porting of libc++
# ------------- libclc -------------
Package: libclc-12
Section: libs
Architecture: all
Multi-Arch: foreign
Depends:
${misc:Depends},
libclc-12-dev (= ${binary:Version}),
libclang-common-12-dev,
Breaks: libclc-amdgcn, libclc-ptx, libclc-r600
Provides: libclc-x.y
Conflicts: libclc-x.y
Replaces: libclc-x.y, libclc-amdgcn, libclc-ptx, libclc-r600,
Description: OpenCL C language implementation - platform support
libclc is an open implementation of the OpenCL C programming language,
as specified by the OpenCL 1.1 Specification.
.
This package contains support for the amdgcn (AMD GPU), PTX and r600
platforms.
Package: libclc-12-dev
Section: libdevel
Architecture: all
Multi-Arch: foreign
Depends:
${misc:Depends},
Breaks: libclc-dev
Provides: libclc-x.y-dev
Conflicts: libclc-x.y-dev
Replaces: libclc-dev, libclc-x.y-dev
Description: OpenCL C language implementation - development files
libclc is an open implementation of the OpenCL C programming language,
as specified by the OpenCL 1.1 Specification.
.
This package contains development header files.

2
debian/libclc-X.Y-dev.install.in vendored Normal file
View File

@ -0,0 +1,2 @@
usr/include
usr/lib/pkgconfig

1
debian/libclc-X.Y.install.in vendored Normal file
View File

@ -0,0 +1 @@
usr/lib/clc/*.bc

View File

@ -1020,6 +1020,15 @@ g++ -nostdinc++ -I/usr/lib/llvm-$VERSION/bin/../include/c++/v1/ -L/usr/lib/llvm-
./o > /dev/null
fi
# libclc
if test ! -f /usr/lib/clc/amdgcn--amdhsa.bc; then
echo "Install libclc-$VERSION";
exit -1;
fi
LLVM_CONFIG=llvm-config-$VERSION ./libclc/check_external_calls.sh /usr/lib/clc/amdgcn--amdhsa.bc > /dev/null
if test ! -f /usr/lib/llvm-$VERSION/include/polly/LinkAllPasses.h; then
echo "Install libclang-common-$VERSION-dev for polly";

29
debian/rules vendored
View File

@ -522,7 +522,26 @@ debian-libcxxabi-build:
$(PRE_PROCESS_CONF) make $(NJOBS) $(VERBOSE) CXXFLAGS="$(CXXFLAGS_EXTRA)" LDFLAGS="$(LDFLAGS_EXTRA)"
touch $@
override_dh_auto_build: debian-full-build debian-libfuzzer-build debian-libcxx-build debian-libcxxabi-build
debian-libclc-build:
# Builds libclc
mkdir -p libclc/build
CMAKE_BIN=cmake; \
if test -f /tmp/cmake/bin/cmake; then \
CMAKE_BIN=/tmp/cmake/bin/cmake; \
fi; \
echo "Using cmake: $$CMAKE_BIN"; \
cd libclc/build && \
$$CMAKE_BIN ../ \
-DCMAKE_INSTALL_DATADIR=/usr/lib \
-DCMAKE_INSTALL_INCLUDEDIR=/usr/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)
touch $@
override_dh_auto_build: debian-full-build debian-libfuzzer-build debian-libcxx-build debian-libcxxabi-build debian-libclc-build
override_dh_prep: build_doc
dh_prep
@ -656,6 +675,7 @@ endif
$(MAKE) -C libcxxabi/build install DESTDIR=$(DEB_INST)
$(MAKE) -C libcxx/build install DESTDIR=$(DEB_INST)
$(MAKE) -C libclc/build install DESTDIR=$(DEB_INST)
# Rename binaries
mkdir -p $(DEB_INST)/usr/bin/
@ -855,6 +875,9 @@ endif
# Libcxxabi
$(MAKE) $(MAKE) -C libcxxabi/build check-libcxxabi || true
# Libclc
$(MAKE) $(MAKE) -C libclc/build test || true
# LLDB tests
ifeq (,$(filter $(DEB_HOST_ARCH), $(LLDB_DISABLE_ARCHS) armhf armel))
ifneq (,$(filter codecoverage,$(DEB_BUILD_OPTIONS)))
@ -915,7 +938,7 @@ override_dh_auto_clean:
rm -f $(CURDIR)/utils/vim/llvm-$(LLVM_VERSION).vim $(CURDIR)/utils/vim/tablegen-$(LLVM_VERSION).vim
rm -f $(CURDIR)/clang/tools/clang-format/clang-format-diff-$(LLVM_VERSION)
rm -f $(CURDIR)/clang/tools/clang-format/clang-format-$(LLVM_VERSION).py
rm -rf libcxx/build libcxxabi/build
rm -rf libcxx/build libcxxabi/build libclc/build
if test -f lld/docs/ld.lld-$(LLVM_VERSION).1; then \
mv lld/docs/ld.lld-$(LLVM_VERSION).1 lld/docs/ld.lld.1; \
fi
@ -926,4 +949,4 @@ override_dh_auto_clean:
: # for some reason, the docs are written to debian/usr and debian/man ...
rm -rf debian/usr debian/man
.PHONY: override_dh_strip preconfigure debian-full-build debian-libfuzzer-build debian-libcxx-build debian-libcxxabi-build
.PHONY: override_dh_strip preconfigure debian-full-build debian-libfuzzer-build debian-libcxx-build debian-libcxxabi-build debian-libclc-build