aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/buildfile
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-07-18 12:07:42 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-07-18 12:07:42 +0200
commita2b82076701a7b568eb1a55c9618038922c66f48 (patch)
treef1da009a98cfbd9dfb78b6e316b6d675f6ca33e2 /libbuild2/buildfile
parentc30dedcdca8d33bc66f225468cc6453f489df73d (diff)
Work around Clang bug #45021
Diffstat (limited to 'libbuild2/buildfile')
-rw-r--r--libbuild2/buildfile10
1 files changed, 10 insertions, 0 deletions
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.
#