Re: Adding flags to dub build
On Tuesday, 18 July 2017 at 20:12:13 UTC, Jean-Louis Leroy wrote: On Tuesday, 18 July 2017 at 20:00:48 UTC, Guillaume Piolat wrote: On Tuesday, 18 July 2017 at 19:49:35 UTC, Jean-Louis Leroy wrote: Hi, I want to add a few flags while building with dub. I tried: DFLAGS='-d-version=explain' dub test ... ...but DFLAGS does not seem to be honored. In fact I wouldn't mind adding a builtType to my dub.sdl (but then will it be inherited by the subpackages) but I don't see how to specify flags there either...maybe because it tries to hide variations in compiler switches? J-L Use "dflags" or "lflags" (linker) It doesn't work either... It's a build setting [1], not a command line option, you set it in the package file (dub.json/dub.sdl)... https://code.dlang.org/package-format?lang=json#build-settings
Re: Adding flags to dub build
On Tuesday, 18 July 2017 at 20:12:13 UTC, Jean-Louis Leroy wrote: On Tuesday, 18 July 2017 at 20:00:48 UTC, Guillaume Piolat wrote: On Tuesday, 18 July 2017 at 19:49:35 UTC, Jean-Louis Leroy wrote: Hi, I want to add a few flags while building with dub. I tried: DFLAGS='-d-version=explain' dub test ... ...but DFLAGS does not seem to be honored. In fact I wouldn't mind adding a builtType to my dub.sdl (but then will it be inherited by the subpackages) but I don't see how to specify flags there either...maybe because it tries to hide variations in compiler switches? J-L Use "dflags" or "lflags" (linker) It doesn't work either... The Source holds all the answers ;-) DFLAGS='-d-version=explain' dub test openmethods:benchmarks --build '$DFLAGS' ... Performing "$DFLAGS" build using ldc2 for x86_64. ...
Re: Adding flags to dub build
On Tuesday, 18 July 2017 at 20:00:48 UTC, Guillaume Piolat wrote: On Tuesday, 18 July 2017 at 19:49:35 UTC, Jean-Louis Leroy wrote: Hi, I want to add a few flags while building with dub. I tried: DFLAGS='-d-version=explain' dub test ... ...but DFLAGS does not seem to be honored. In fact I wouldn't mind adding a builtType to my dub.sdl (but then will it be inherited by the subpackages) but I don't see how to specify flags there either...maybe because it tries to hide variations in compiler switches? J-L Use "dflags" or "lflags" (linker) It doesn't work either... dflags='-d-version=explain' dub --vverbose test openmethods:benchmarks --build release --force Using dub registry url 'http://code.dlang.org/' Refreshing local packages (refresh existing: true)... Looking for local package map at /var/lib/dub/packages/local-packages.json Looking for local package map at /home/jleroy/.dub/packages/local-packages.json Determined package version using GIT: openmethods 0.0.1+commit.5.g94ad5a9 Refreshing local packages (refresh existing: false)... Looking for local package map at /var/lib/dub/packages/local-packages.json Looking for local package map at /home/jleroy/.dub/packages/local-packages.json Collecting dependencies for openmethods Building package openmethods:benchmarks in /home/jleroy/dev/d/methods.d/benchmarks/ Refreshing local packages (refresh existing: false)... Looking for local package map at /var/lib/dub/packages/local-packages.json Looking for local package map at /home/jleroy/.dub/packages/local-packages.json Collecting dependencies for openmethods:benchmarks Adding local /home/jleroy/dev/d/methods.d/ Found dependency openmethods >=0.0.0 @../ Collecting dependencies for openmethods Checking for missing dependencies. Configurations used for dependency resolution: openmethods (0): [invalid, 0.0.1+commit.5.g94ad5a9] Interation (ci=0) openmethods invalid (C) Interation (ci=-1) openmethods 0.0.1+commit.5.g94ad5a9 Refreshing local packages (refresh existing: false)... Looking for local package map at /var/lib/dub/packages/local-packages.json Looking for local package map at /home/jleroy/.dub/packages/local-packages.json Collecting dependencies for openmethods:benchmarks Adding local /home/jleroy/dev/d/methods.d/ Found dependency openmethods >=0.0.0 @../ Collecting dependencies for openmethods Checking for upgrades. Using cached upgrade results... Package methods can be installed with version 0.0.1. Use "dub upgrade" to perform those changes. Add config openmethods library Add config openmethods:benchmarks Including openmethods:benchmarks -> openmethods library openmethods:benchmarks -> openmethods library Using configuration 'library' for openmethods Using configuration '' for openmethods:benchmarks Add config openmethods library Add config openmethods:benchmarks application Including openmethods:benchmarks application -> openmethods library openmethods:benchmarks application -> openmethods library Using configuration 'library' for openmethods Using configuration 'application' for openmethods:benchmarks Creating build generator. Add config openmethods:benchmarks application Add config openmethods library Including openmethods:benchmarks application -> openmethods library openmethods:benchmarks application -> openmethods library Using configuration 'application' for openmethods:benchmarks Using configuration 'library' for openmethods Gathering build settings for openmethods:benchmarks (application) Fixing relative path: /home/jleroy/dev/d/methods.d/benchmarks/ ~ source/benchmarks.d Fixing relative path: /home/jleroy/dev/d/methods.d/benchmarks/ ~ source/ Executable configuration "application" of package openmethods:benchmarks defines no main source file, this may cause certain build modes to fail. Add an explicit "mainSourceFile" to the package description to fix this. Gathering build settings for openmethods (library) Fixing relative path: /home/jleroy/dev/d/methods.d/ ~ source/ Configuration 'application' does not output a library. Falling back to "dub -b unittest -c application". Add config openmethods:benchmarks application Add config openmethods library Including openmethods:benchmarks application -> openmethods library openmethods:benchmarks application -> openmethods library Using configuration 'application' for openmethods:benchmarks Using configuration 'library' for openmethods Fixing relative path: /home/jleroy/dev/d/methods.d/ ~ source/openmethods.d Fixing relative path: /home/jleroy/dev/d/methods.d/ ~ source/ Fixing relative path: /home/jleroy/dev/d/methods.d/ ~ . Fixing relative path: /home/jleroy/dev/d/methods.d/benchmarks/ ~ source/benchmarks.d Fixing relative path: /home/jleroy/dev/d/methods.d/benchmarks/ ~ source/ Fixing relative path: /home/jleroy/dev/d/methods.d/benchmarks/ ~ . Fixing relative path: /home/jleroy/dev/d/methods.d/benchmarks/ ~ source/benchmarks.d Fixing relative path: /home/jleroy/dev/d/methods.d/benc
Re: Adding flags to dub build
On Tuesday, 18 July 2017 at 19:49:35 UTC, Jean-Louis Leroy wrote: Hi, I want to add a few flags while building with dub. I tried: DFLAGS='-d-version=explain' dub test ... ...but DFLAGS does not seem to be honored. In fact I wouldn't mind adding a builtType to my dub.sdl (but then will it be inherited by the subpackages) but I don't see how to specify flags there either...maybe because it tries to hide variations in compiler switches? J-L Use "dflags" or "lflags" (linker)
Adding flags to dub build
Hi, I want to add a few flags while building with dub. I tried: DFLAGS='-d-version=explain' dub test ... ...but DFLAGS does not seem to be honored. In fact I wouldn't mind adding a builtType to my dub.sdl (but then will it be inherited by the subpackages) but I don't see how to specify flags there either...maybe because it tries to hide variations in compiler switches? J-L