mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 01:12:13 +00:00
Improve NDEBUG handling. Specify <define>NDEBUG as part of <variant>release,
instead of setting it on when there's <optimization>speed. Also, now we don't use active features at all. [SVN r21666]
This commit is contained in:
@@ -25,7 +25,7 @@ t.expect_content("bin/$toolset/debug/a.exe",
|
||||
|
||||
t.expect_addition("lib/bin/$toolset/debug/optimization-speed/b.obj")
|
||||
t.expect_content("lib/bin/$toolset/debug/optimization-speed/b.obj",
|
||||
"""$toolset/debug/define-NDEBUG/include-everything/optimization-speed
|
||||
"""$toolset/debug/include-everything/optimization-speed
|
||||
lib/b.cpp
|
||||
""")
|
||||
|
||||
|
||||
@@ -165,22 +165,10 @@ rule variant ( name # Name of the variant
|
||||
IMPORT $(__name__) : variant : : variant ;
|
||||
|
||||
variant debug : <optimization>off <debug-symbols>on <inlining>off <runtime-debugging>on ;
|
||||
variant release : <optimization>speed <debug-symbols>off <inlining>full <runtime-debugging>off ;
|
||||
variant release : <optimization>speed <debug-symbols>off <inlining>full
|
||||
<runtime-debugging>off <define>NDEBUG ;
|
||||
variant profile : release : <profiling>on <debug-symbols>on ;
|
||||
|
||||
# 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 handle-ndebug ( property : properties * )
|
||||
{
|
||||
return <define>NDEBUG ;
|
||||
}
|
||||
|
||||
feature.action <optimization>speed : handle-ndebug ;
|
||||
|
||||
class searched-lib-target : abstract-file-target
|
||||
{
|
||||
rule __init__ ( name
|
||||
|
||||
Reference in New Issue
Block a user