exercism / nim-test-runner

GNU Affero General Public License v3.0
2 stars 3 forks source link

Build(Dockerfile): Compile with LTO, and strip #32

Closed ee7 closed 3 years ago

ee7 commented 3 years ago

This PR adds compilation/linking flags that make the runner binary smaller and faster.

ee7 commented 3 years ago

I'd add somewhere what the flags do b/c I don't think they're documented.

Good idea - they're definitely under-documented at the moment. It's on the website though, see:

And they're defined here.

I'll just document it in the commit message for now.

ynfle commented 3 years ago

Those are none of the places that I would have looked for compilation options, and that is the reason that I was confused about what they were. I would have assumed them to be somewhere else like here

ee7 commented 3 years ago

I would have assumed them to be somewhere else like here

Yes, I'd expect it there too, given that's where --passC:-flto is mentioned.

It looks like part of the reason that -d:lto is under-documented is that it doesn't work properly on macOS yet. See here.

It might've been better if this PR just did --passC:-flto --passL:-s, but:

(--passL:-flto is only needed for pretty ancient versions of gcc).