Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link only with druntime for the runnable tests if Phobos isn't needed #17854

Open
dlangBugzillaToGithub opened this issue Apr 5, 2018 · 0 comments

Comments

@dlangBugzillaToGithub
Copy link

Seb reported this on 2018-04-05T04:06:12Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=18731

CC List

  • petrug

Description

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant