https://issues.dlang.org/show_bug.cgi?id=22435
Issue ID: 22435
Summary: -unittest causes all template instances to be emitted
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
With a file that's only one line: `import std.uni;`, it takes 4x longer to
compile with -unittest than not. The reason is that `needsCodegen` always (in
essence, in practice it's slightly more complicated) returns true when
-unittest is passed even for non-root modules, and importing Phobos means
generating code for all of them.
--