aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-10-14 13:44:05 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-10-14 13:44:05 +0200
commit132dabe24e847827129e960f433b0dfa006d077e (patch)
tree7ee887d1ded8b98b56716927ae1cf58409d26384
parentf11e0849d09aeb3926d160d794b4b8106051e5c6 (diff)
Work around what looks like another instance of Clang bug #45021
-rw-r--r--bdep/buildfile9
1 files changed, 9 insertions, 0 deletions
diff --git a/bdep/buildfile b/bdep/buildfile
index 98a03f1..6fbee61 100644
--- a/bdep/buildfile
+++ b/bdep/buildfile
@@ -107,6 +107,15 @@ switch $cxx.class
if ($cxx.target.class == 'linux')
cxx.loptions += -rdynamic
+# @@ TMP work around what looks like Clang bug #45021 (first triggered with
+# Clang 13.0.0).
+#
+if ($cxx.id == 'clang' && $cxx.target.system == 'win32-msvc')
+{
+ if ($regex.find_match($cc.coptions $cxx.coptions, '-O[23]'))
+ obj{new}: cxx.coptions += -O1
+}
+
# Generated options parser.
#
if $cli.configured