[build2] How: build specific compilaton - out of source
Boris Kolpackov
boris at codesynthesis.com
Tue Aug 10 15:14:38 UTC 2021
hjansen.iv via users <users at build2.org> writes:
> In the same directory I have
>
> myproj/
> myproj-gcc-dbg/
> myproj-gcc-rel/
>
> where the last two dirs are development and release build configurations.
>
> In the myproj root directory I can do:
> `bdep update @gcc-dbg` and `bdep update @gcc-rel`
> How do I specify `-g` and `-O3` conditional compilation flags for
> `dbg` and `rel` versions respectively?
When you were initially creating these configurations, you could
have specified the necessary flags along these lines:
bdep init -C @gcc-dbg cc config.cc.coptions=-g
bdep init -C @gcc-rel cc config.cc.coptions=-O3
Now that you already have them, you could either edit
myproj-gcc-{dbg,rel}/build/config.build and add the options manually
or you can reconfigure them from the command line:
b configure: myproj-gcc-dbg/ config.cc.coptions+=-g
b configure: myproj-gcc-rel/ config.cc.coptions+=-O3
More information about the users
mailing list