From hjansen.iv at protonmail.com Fri Aug 6 17:09:05 2021 From: hjansen.iv at protonmail.com (hjansen.iv) Date: Fri, 06 Aug 2021 17:09:05 +0000 Subject: [build2] How: build specific compilaton - out of source Message-ID: <7xFlUoa1mg4MdB6b9GdhzX2fRdj9E9qKkx1WstneOe9eWnjzEdVgvGyK4qajU7aaie2bghHAdpdw6rQAxC-kgod6jIaotY6pHQlj03IWBts=@protonmail.com> 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? Thanks, -- Henk Sent with [ProtonMail](https://protonmail.com/) Secure Email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From boris at codesynthesis.com Tue Aug 10 15:14:38 2021 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue, 10 Aug 2021 17:14:38 +0200 Subject: [build2] How: build specific compilaton - out of source In-Reply-To: <7xFlUoa1mg4MdB6b9GdhzX2fRdj9E9qKkx1WstneOe9eWnjzEdVgvGyK4qajU7aaie2bghHAdpdw6rQAxC-kgod6jIaotY6pHQlj03IWBts=@protonmail.com> References: <7xFlUoa1mg4MdB6b9GdhzX2fRdj9E9qKkx1WstneOe9eWnjzEdVgvGyK4qajU7aaie2bghHAdpdw6rQAxC-kgod6jIaotY6pHQlj03IWBts=@protonmail.com> Message-ID: hjansen.iv via users 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