tags 979655 + patch
thanks

Dear LLVM maintainers:

Please apply the following patch for Debian 10.8.

Thanks.
diff --git a/debian/rules b/debian/rules
index 8a12bb32..58d55a4f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,7 +17,8 @@ SONAME_EXT      := 1
 # Manage the case when the version is 1:3.5~svn213052-1~exp1 or 1: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)
@@ -559,10 +560,13 @@ endif
 # Clang extra tests (ex: clang-tidy)
 	$(MAKE) $(NJOBS) -C $(TARGET_BUILD) 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) check-lld || true
 endif
+endif
 
 # Sanitizer
 	$(MAKE) $(NJOBS) -C $(TARGET_BUILD) check-sanitizer || true

Reply via email to