prepare the deactivation of stage2

This commit is contained in:
Sylvestre Ledru 2018-11-11 21:16:39 +01:00
parent 0fc78cdf4c
commit ac7fd96f94

14
debian/rules vendored
View File

@ -4,6 +4,9 @@ TARGET_BUILD := build-llvm
TARGET_BUILD_STAGE2 := $(TARGET_BUILD)/tools/clang/stage2-bins
DEB_INST := $(CURDIR)/debian/tmp/
# Disable to move the previous method
BUILD_METHOD := stage2
GXX_VERSIONED_PACKAGE := $(shell dpkg-query -W -f '$${Depends}' g++ | grep -o 'g++-[0-9][0-9.]*' | tail -n1 )
GXX_VERSIONED_EXECUTABLE := $(shell dpkg -L $(GXX_VERSIONED_PACKAGE) | grep '/usr/bin/g++-[0-9][0-9.]*' | xargs ls -d | tail -n1 )
GCC_VERSION := $(subst /usr/bin/g++-,,$(GXX_VERSIONED_EXECUTABLE))
@ -361,12 +364,13 @@ VERBOSE=VERBOSE=1
#VERBOSE=-v
debian-full-build:
$(PRE_PROCESS) make $(NJOBS) -C $(TARGET_BUILD) $(VERBOSE) CXXFLAGS="$(CXXFLAGS_EXTRA)" LDFLAGS="$(LDFLAGS_EXTRA)" REQUIRES_RTTI=1 DEBUGMAKE=1 stage2
$(PRE_PROCESS) make $(NJOBS) -C $(TARGET_BUILD) $(VERBOSE) CXXFLAGS="$(CXXFLAGS_EXTRA)" LDFLAGS="$(LDFLAGS_EXTRA)" REQUIRES_RTTI=1 DEBUGMAKE=1 $(BUILD_METHOD)
# Check the stage 2 build worked
if test "$(BUILD_METHOD)" = "stage2"; then \
if ! readelf --string-dump .comment $(TARGET_BUILD_STAGE2)/bin/clang 2>&1|grep -q "clang version"; then \
echo "clang hasn't been built using clang. Bye bye. Check that the stage2 build has been done."; \
fi; \
fi
touch $@
@ -495,7 +499,11 @@ override_dh_auto_install:
# Clean up temporary files to make sure the install works
rm -rf $(find $(TARGET_BUILD) -wholename '*CMakeFiles*' -not -name CMakeLists.txt -a -name "*.dir" -type d)
# install/fast enables a make install without recompiling temporary files
$(MAKE) -C $(TARGET_BUILD) $(VERBOSE) stage2-install DESTDIR=$(DEB_INST)/
if test "$(BUILD_METHOD)" = "stage2"; then \
$(MAKE) -C $(TARGET_BUILD) $(VERBOSE) stage2-install DESTDIR=$(DEB_INST)/; \
else \
$(MAKE) -C $(TARGET_BUILD) $(VERBOSE) install DESTDIR=$(DEB_INST)/; \
fi
# Not used on Linux.
rm -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/bin/argdumper
rm -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/share/clang/clang-format-bbedit.applescript