From a2b82076701a7b568eb1a55c9618038922c66f48 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 18 Jul 2020 12:07:42 +0200 Subject: Work around Clang bug #45021 --- libbuild2/buildfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libbuild2/buildfile b/libbuild2/buildfile index ce5a090..831a9b9 100644 --- a/libbuild2/buildfile +++ b/libbuild2/buildfile @@ -172,6 +172,16 @@ if ($cxx.target.class != 'windows') if ($cxx.target.class != "bsd") libus{build2}: cxx.libs += -ldl } +else +{ + # @@ TMP work around Clang bug #45021. + # + if ($cxx.id == 'clang' && $cxx.target.system == 'win32-msvc') + { + if ($regex.find_match($cc.coptions $cxx.coptions, '-O[23]')) + script/obj{run}: cxx.coptions += -O1 + } +} # Export options. # -- cgit v1.1