tags 979656 + patch
thanks

Dear LLVM maintainers:

Please apply the following patch for Debian 10.8.

Thanks.
diff --git a/debian/rules b/debian/rules
index 53e229673..1016f3b48 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,7 +22,8 @@ SONAME_OPENMP	:= 5
 # Manage the case when the version is 3.5~svn213052-1~exp1 or 3.4.2-1
 DEBIAN_REVISION := $(shell dpkg-parsechangelog |  sed -rne "s,^Version: 1:([0-9.]+)(~|-)(.*),\3,p")
 ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
-  NJOBS := -j $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
+  NPARALLEL := $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
+  NJOBS := -j $(NPARALLEL)
 endif
 
 VENDOR=$(shell lsb_release -is)
@@ -762,10 +763,13 @@ endif
 # Clang extra tests (ex: clang-tidy)
 	$(MAKE) $(NJOBS) -C $(TARGET_BUILD_STAGE2) check-clang-tools || true
 
+# The test suite is known to hang if there is only one CPU
+ifneq (1,$(NPARALLEL))
 # LLD tests
 ifeq (${LLD_ENABLE},yes)
 	$(MAKE) $(NJOBS) -C $(TARGET_BUILD_STAGE2) check-lld || true
 endif
+endif
 
 # Sanitizer
 	$(MAKE) $(NJOBS) -C $(TARGET_BUILD_STAGE2) check-sanitizer || true

Reply via email to