summaryrefslogtreecommitdiff
path: root/Jamroot
diff options
context:
space:
mode:
authorPeter Dimov <pdimov@gmail.com>2020-09-05 18:05:02 +0300
committerPeter Dimov <pdimov@gmail.com>2021-06-12 00:03:53 +0300
commit976deac5cbcf5b37dec093175831880fe0e7ec51 (patch)
tree833ba84f55fc5634fb79347d85440176393fe0a9 /Jamroot
parentb7ca8b7dcc077d2e0c1eeea6b5a7438ddc3ee839 (diff)
downloadboost-976deac5cbcf5b37dec093175831880fe0e7ec51.tar.gz
Add an option --allow-shared-static that enables link=shared, runtime-link=static; refactor and reword warning message
Diffstat (limited to 'Jamroot')
-rw-r--r--Jamroot19
1 files changed, 8 insertions, 11 deletions
diff --git a/Jamroot b/Jamroot
index 37e20d30e3..de966a8fa6 100644
--- a/Jamroot
+++ b/Jamroot
@@ -213,18 +213,15 @@ rule handle-static-runtime ( properties * )
# dangerous on Windows. Therefore, we disallow it. This might be drastic,
# but it was disabled for a while without anybody complaining.
- # For CW, static runtime is needed so that std::locale works.
- if <link>shared in $(properties) && <runtime-link>static in $(properties) &&
- ! ( <toolset>cw in $(properties) )
- {
- if ! $(.shared-static-warning-emitted)
- {
- ECHO "warning: skipping configuration link=shared, runtime-link=static" ;
- ECHO "warning: this combination is either impossible or too dangerous" ;
- ECHO "warning: to be of any use" ;
- .shared-static-warning-emitted = 1 ;
- }
+ local argv = [ modules.peek : ARGV ] ;
+ if <link>shared in $(properties)
+ && <runtime-link>static in $(properties)
+ # For CW, static runtime is needed so that std::locale works.
+ && ! ( <toolset>cw in $(properties) )
+ && ! --allow-shared-static in $(argv)
+ {
+ boostcpp.emit-shared-static-warning ;
return <build>no ;
}
}