www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Compiling dynamic library but not its dependencies with specific

reply Per =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
Given shared library `X` depending on other shared libraries 
`Ys`, is it possible, using dub, to use extra `dflags` `F` when 
building the sources of `X` only and not have those extra flags 
`F` be used when (re)compiling `Ys`. In my specific case those 
flags are `-fsanitize=address` and `-cov`.
Sep 18 2022
parent Per =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
On Sunday, 18 September 2022 at 08:24:27 UTC, Per Nordlöw wrote:
 Given shared library `X` depending on other shared libraries 
 `Ys`, is it possible, using dub, to use extra `dflags` `F` when 
 building the sources of `X` only and not have those extra flags 
 `F` be used when (re)compiling `Ys`. In my specific case those 
 flags are `-fsanitize=address` and `-cov`.
The solution was to define a new build. For instance as ```json { "buildTypes": { "debug-cov": { "buildOptions": ["debugMode", "debugInfo", "coverage"] } } } ``` in `dub.json`.
Sep 19 2022