Bug 221836 - cad/stepcode Workaround for clang 5.0 regression
Summary: cad/stepcode Workaround for clang 5.0 regression
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs mailing list
URL: https://lists.freebsd.org/pipermail/f...
Keywords:
Depends on: 221835
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-26 17:55 UTC by Fernando Apesteguía
Modified: 2017-09-02 10:14 UTC (History)
1 user (show)

See Also:


Attachments
patch to the ports tree (1.20 KB, text/plain)
2017-08-26 17:55 UTC, Fernando Apesteguía
fernape: maintainer-approval+
Details
patch to the ports tree V2 (1.28 KB, patch)
2017-08-29 18:53 UTC, Fernando Apesteguía
fernape: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fernando Apesteguía freebsd_committer 2017-08-26 17:55:31 UTC
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)
Comment 1 Fernando Apesteguía freebsd_committer 2017-08-29 18:53:31 UTC
Created attachment 185888 [details]
patch to the ports tree V2

Reworked patch since the PR this one depends on had to be reworked too.
Comment 2 commit-hook freebsd_committer 2017-09-01 18:54:27 UTC
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
Comment 3 Fernando Apesteguía freebsd_committer 2017-09-02 10:14:48 UTC
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