Bug 18731 – Link only with druntime for the runnable tests if Phobos isn't needed

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-04-05T04:06:12Z
Last change time
2024-12-13T18:58:12Z
Keywords
bootcamp
Assigned to
No Owner
Creator
Seb
Moved to GitHub: dmd#17854 →

Comments

Comment #0 by greensunny12 — 2018-04-05T04:06:12Z
All 1283 fail_compilation tests compile in ~11s on my machine. The 774 compilable tests are slightly slower with ~25s ... and you don't want to know how long runnable takes :/ So the runnable tests are the real bad boys. (numbers are taken with an i7 4th Gen with full parallelism) Now a majority of the tests doesn't even need Phobos, so a simple optimization could be to only link druntime if nothing from Phobos is imported. At the moment DRuntime has a size of 9.8M whereas Phobos clocks in with 64M (including druntime). So just using DRuntime would mean a lot less work for the linker. At the moment this the linking is defined in `test/Makefile` like `DFLAGS+=-defaultlib=libphobos2.so`, now in theory it would be as easy as replacing this with `DFLAGS+=-defaultlib=libdruntime.so.a`, in practice more work is required because it needs to be done only for the tests that don't use Phobos (or all tests using Phobos need to be moved to Phobos)
Comment #1 by robert.schadek — 2024-12-13T18:58:12Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17854 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB