From 084ae2c4dc6dc4b6d0de7e41d97b1ba672bcc2a8 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Tue, 13 Jan 2004 10:18:09 +0000 Subject: [PATCH] Improve NDEBUG handling. Specify NDEBUG as part of release, instead of setting it on when there's speed. Also, now we don't use active features at all. [SVN r21666] --- v2/test/project_test4.py | 2 +- v2/tools/builtin.jam | 16 ++-------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/v2/test/project_test4.py b/v2/test/project_test4.py index 52ddbb04f..d89b803d3 100644 --- a/v2/test/project_test4.py +++ b/v2/test/project_test4.py @@ -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 """) diff --git a/v2/tools/builtin.jam b/v2/tools/builtin.jam index b67e82a3b..6020bd02b 100644 --- a/v2/tools/builtin.jam +++ b/v2/tools/builtin.jam @@ -165,22 +165,10 @@ rule variant ( name # Name of the variant IMPORT $(__name__) : variant : : variant ; variant debug : off on off on ; -variant release : speed off full off ; +variant release : speed off full + off NDEBUG ; variant profile : release : on on ; -# When speed is specified, we need to add NDEBUG -# It is done via 'active' features, because it should be done for -# all targets built with speed. Since is free, it is -# not propagated, we can't just add it to 'release'. And we cannot make -# propagated, because (i) free features cannot be propagated and -# (ii) this is dangerous. -rule handle-ndebug ( property : properties * ) -{ - return NDEBUG ; -} - -feature.action speed : handle-ndebug ; - class searched-lib-target : abstract-file-target { rule __init__ ( name