2
0
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:
Vladimir Prus
2003-04-14 11:02:34 +00:00
parent 9969209255
commit b040c8b42e
4 changed files with 62 additions and 1 deletions

View File

@@ -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 ?