Created attachment 185788 [details] patch to the ports tree There's a regression in clang 5.0 that was detected thanks to this port been marked as a runaway process when being built in -CURRENT. On i386 with clang 5.0, big compilation units take huge times to compile compared to previous clang versions. The bug has been reported upstream. In the meantime, fall back to use clang38 if the conditions for the bug are met. With this patch it takes under 17 minutes to build the port in a fully virtualized environment. Please note that when the fix is imported into FreeBSD, this patch won't be necessary so this should not be MFH'd. For details, see: https://lists.freebsd.org/pipermail/freebsd-hackers/2017-August/051361.html Q/A: - portlint -AC: OK - poudriere builds for {10.3,11.0,11.1}{amd64,i386}: OK - build in 12-CURRENT i386: OK (less than 17 minutes)
Created attachment 185888 [details] patch to the ports tree V2 Reworked patch since the PR this one depends on had to be reworked too.
A commit references this bug: Author: dim Date: Fri Sep 1 18:53:39 UTC 2017 New revision: 323112 URL: https://svnweb.freebsd.org/changeset/base/323112 Log: Upgrade our copies of clang, llvm, lldb and compiler-rt to r312293 from the upstream release_50 branch. This corresponds to 5.0.0 rc4. As of this version, the cad/stepcode port should now compile in a more reasonable time on i386 (see bug 221836 for more information). PR: 221836 MFC after: 2 months X-MFC-with: r321369 Changes: _U head/contrib/compiler-rt/ _U head/contrib/libc++/ _U head/contrib/llvm/ head/contrib/llvm/include/llvm/CodeGen/SelectionDAGNodes.h head/contrib/llvm/lib/Analysis/PostDominators.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp _U head/contrib/llvm/tools/clang/ head/contrib/llvm/tools/clang/include/clang/AST/DeclCXX.h head/contrib/llvm/tools/clang/include/clang/Driver/Options.td head/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.def head/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h head/contrib/llvm/tools/clang/lib/CodeGen/ABIInfo.h head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.h head/contrib/llvm/tools/clang/lib/CodeGen/ItaniumCXXABI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp head/contrib/llvm/tools/clang/lib/Format/WhitespaceManager.cpp head/contrib/llvm/tools/clang/lib/Format/WhitespaceManager.h head/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp _U head/contrib/llvm/tools/lld/ _U head/contrib/llvm/tools/lldb/ head/contrib/llvm/tools/lldb/source/Host/common/TCPSocket.cpp head/lib/clang/include/clang/Basic/Version.inc head/lib/clang/include/lld/Config/Version.inc head/lib/clang/include/llvm/Support/VCSRevision.h
Thanks for the heads up! cad/stepcode now compiles in ~37 minutes in VirtualBox with just 1 CPU and the most important thing is that big compilation units don't get stuck anymore. Closing this PR. Cheers