dlang / dub

Package and build management system for D
MIT License
677 stars 227 forks source link

dflags-ldc (and probably dflags-gdc and dflags-dmd) don't work with SDL recipes #2958

Closed apbryan closed 3 months ago

apbryan commented 3 months ago

System information

Bug Description

defining dlfags-ldc in a dub.sdl file does nothing (works in dub.json though)

How to reproduce?

alex@compy  programming/tmp cat dub.sdl                                                                                                                            23:11:11 24-08-12
name "tmp"
description "A minimal D application."
authors "alex"
copyright "Copyright © 2024, alex"
license "MPL-2.0"

dflags-ldc "cause_an_error"
alex@compy  programming/tmp /usr/bin/dub build --compiler=ldc2 --force -v                                                                                          23:11:15 24-08-12
Note: Failed to determine version of package tmp at .. Assuming ~master.
Generating using build
Configuring dependent tmp, deps:
    Starting Performing "debug" build using ldc2 for x86_64.
    Building tmp ~master: building configuration [application]
ldc2 -d-debug -g -w --oq -od=/home/alex/.dub/cache/tmp/~master/build/application-debug-3sqG5BWyZSjhbQjs8Hb6-w/obj -d-version=Have_tmp -Isource/ source/app.d -c -of/home/alex/.dub/cache/tmp/~master/build/application-debug-3sqG5BWyZSjhbQjs8Hb6-w/tmp.o -vcolumns
     Linking tmp
ldc2 -of/home/alex/.dub/cache/tmp/~master/build/application-debug-3sqG5BWyZSjhbQjs8Hb6-w/tmp /home/alex/.dub/cache/tmp/~master/build/application-debug-3sqG5BWyZSjhbQjs8Hb6-w/tmp.o -L--no-as-needed -g
Copying target from /home/alex/.dub/cache/tmp/~master/build/application-debug-3sqG5BWyZSjhbQjs8Hb6-w/tmp to /home/alex/programming/tmp
alex@compy  programming/tmp

Expected Behavior

Would expect whatever is specified in dflags-ldc to be passed to the compiler when running with --compiler-ldc2

Geod24 commented 3 months ago

https://dub.pm/dub-reference/build_settings/#dflags

dflags `--relocation-model=rwpi` platform="ldc"