mirror of
https://github.com/boostorg/build.git
synced 2026-02-14 00:32:11 +00:00
Bugfix: set NDEBUG for release builds.
* new/builtin.jam: Make <optimization>speed active property and add <define>NDEBUG for it. * test/ndebug.py: New test. [SVN r18250]
This commit is contained in:
@@ -141,6 +141,19 @@ IMPORT $(__name__) : variant : : variant ;
|
||||
variant debug : <optimization>off <debug-symbols>on <inlining>off ;
|
||||
variant release : <optimization>speed <debug-symbols>off <inlining>full ;
|
||||
|
||||
# When <optimization>speed is specified, we need to add <define>NDEBUG
|
||||
# It is done via 'active' features, because it should be done for
|
||||
# all targets built with <optimization>speed. Since <define> is free, it is
|
||||
# not propagated, we can't just add it to 'release'. And we cannot make
|
||||
# <define> propagated, because (i) free features cannot be propagated and
|
||||
# (ii) this is dangerous.
|
||||
rule builtin.handle-ndebug ( property : properties * )
|
||||
{
|
||||
return <define>NDEBUG ;
|
||||
}
|
||||
feature.action <optimization>speed : builtin.handle-ndebug ;
|
||||
|
||||
|
||||
rule searched-lib-target ( name
|
||||
: project
|
||||
: shared ?
|
||||
|
||||
Reference in New Issue
Block a user