Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
September 23, 2017 Cannot make LDC use LTO when called via DUB | ||||
---|---|---|---|---|
| ||||
I've added buildType "release" { buildOptions "releaseMode" "optimize" "inline" dflags-posix-ldc "-flto=thin" "-Xcc=-fuse-ld=gold" } to my dub.sdl and built (on Linux) as /usr/bin/dub -v run --compiler=ldc2 --build=release but neither the flag "-flto=thin" nor "-Xcc=-fuse-ld=gold" is propagated to the ldc2 call (at least no printed on stdout). What's missing? |
September 23, 2017 Re: Cannot make LDC use LTO when called via DUB | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nordlöw | On Saturday, 23 September 2017 at 15:19:09 UTC, Nordlöw wrote:
> I've added
>
> buildType "release" {
> buildOptions "releaseMode" "optimize" "inline"
> dflags-posix-ldc "-flto=thin" "-Xcc=-fuse-ld=gold"
> }
>
> to my dub.sdl and built (on Linux) as
>
> /usr/bin/dub -v run --compiler=ldc2 --build=release
>
> but neither the flag "-flto=thin" nor "-Xcc=-fuse-ld=gold" is propagated to the ldc2 call (at least no printed on stdout).
>
> What's missing?
Neither
dflags-dmd "-xxx"
dflags-posix-dmd "-xxx"
dflags-linux-dmd "-xxx"
has any effect on my build (in dub.sdl).
|
September 25, 2017 Re: Cannot make LDC use LTO when called via DUB | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nordlöw | > Neither
>
> dflags-dmd "-xxx"
> dflags-posix-dmd "-xxx"
> dflags-linux-dmd "-xxx"
>
> has any effect on my build (in dub.sdl).
I didn't know dflags-* was a thing, and I can't find it in docs either.
Maybe you are looking for
dflags "..." platform="..."
|
September 25, 2017 Re: Cannot make LDC use LTO when called via DUB | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sebastiaan Koppe | On 2017-09-25 09:47, Sebastiaan Koppe wrote: > I didn't know dflags-* was a thing, and I can't find it in docs either. That's how it works in the JSON package description file. -- /Jacob Carlborg |
September 25, 2017 Re: Cannot make LDC use LTO when called via DUB | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sebastiaan Koppe | On Monday, 25 September 2017 at 07:47:28 UTC, Sebastiaan Koppe wrote:
> Maybe you are looking for
>
> dflags "..." platform="..."
Ahh, you're right.
Thanks!
|
Copyright © 1999-2021 by the D Language Foundation