From 132dabe24e847827129e960f433b0dfa006d077e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 14 Oct 2021 13:44:05 +0200 Subject: Work around what looks like another instance of Clang bug #45021 --- bdep/buildfile | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- cgit v1.1