digitalmars.D.learn - Cannot make LDC use LTO when called via DUB
- =?UTF-8?B?Tm9yZGzDtnc=?= (10/10) Sep 23 2017 I've added
- =?UTF-8?B?Tm9yZGzDtnc=?= (6/16) Sep 23 2017 Neither
- Sebastiaan Koppe (4/9) Sep 25 2017 I didn't know dflags-* was a thing, and I can't find it in docs
- Jacob Carlborg (4/5) Sep 25 2017 That's how it works in the JSON package description file.
- =?UTF-8?B?Tm9yZGzDtnc=?= (4/6) Sep 25 2017 Ahh, you're right.
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?
Sep 23 2017
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).
Sep 23 2017
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="..."
Sep 25 2017
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
Sep 25 2017
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!
Sep 25 2017









Jacob Carlborg <doob me.com> 