Allow passing additional DFLAGS to the DMD build#8089
Conversation
|
Hmm, environment variables are respected too and I think we don't want a global DFLAGS setting to affect the DMD build, so it looks like it's not as simple as this :/ |
There are many predefined ways to build DMD, but AFAIK one can't easily pass in its own `DFLAGS` without modifying the Makefile. With this change the following is now possible: ``` make -f posix.mak DFLAGS="-version=FooBar" ``` Learn more about `override`: https://www.gnu.org/software/make/manual/make.html#Override-Directive
|
Thanks for your pull request, @wilzbach! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + dmd#8089" |
|
So looking at the manual there's a good solution:
https://www.gnu.org/software/make/manual/html_node/Environment.html#Environment which means that: DFLAGS=
override DFLAGS += -version=MARS $(PIC)will ignore environment variables, but allow user-defined command line arguments: |
There are many predefined ways to build DMD, but AFAIK one can't easily
pass in its own
DFLAGSwithout modifying the Makefile.With this change the following is now possible:
Learn more about
override: https://www.gnu.org/software/make/manual/make.html#Override-Directive