mirror of
https://github.com/boostorg/filesystem.git
synced 2026-07-21 13:13:44 +00:00
Use regex.replace in Jamfile to strip sanitizers from the command line.
As was pointed out in https://github.com/bfgroup/b2/issues/597, the regex.replace rule is declared without colons separating arguments, and if the rule is invoked accordingly b2 doesn't crash. So use regex.replace to remove sanitizer flags from the compiler command line.
This commit is contained in:
+1
-4
@@ -10,7 +10,6 @@
|
||||
import project ;
|
||||
import configure ;
|
||||
import regex ;
|
||||
import string ;
|
||||
import-search /boost/config/checks ;
|
||||
import config : requires ;
|
||||
|
||||
@@ -129,9 +128,7 @@ rule check-linkflag-no-undefined ( properties * )
|
||||
|
||||
if [ MATCH "^(<(compile|c|cxx|link)flags>.*-fsanitize=.+)$" : $(property) ]
|
||||
{
|
||||
# Note: avoid using regex.replace due to b2 bug: https://github.com/bfgroup/b2/issues/597
|
||||
# property = [ regex.replace $(property) : "-fsanitize=[^\s]+\s*" : "" ] ;
|
||||
property = [ string.join [ regex.transform $(property) : "^(.*)-fsanitize=[^\s]+\s*(.*)$" : 1 2 ] : "" ] ;
|
||||
property = [ regex.replace $(property) "-fsanitize=[^\s]+\s*" "" ] ;
|
||||
if [ MATCH "^(<(compile|c|cxx|link)flags>)\s*$" : $(property) ]
|
||||
{
|
||||
continue ;
|
||||
|
||||
Reference in New Issue
Block a user