[llvm-bugs] [Bug 40964] New: clang-cl doesn't support /Qspectre
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Mar 5 07:03:26 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=40964
Bug ID: 40964
Summary: clang-cl doesn't support /Qspectre
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: nicolasweber at gmx.de
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at metafoo.co.uk
cl.exe has spectre type 1 mitigation under /Qspectre, and apparently cmake now
(sometimes?) sets this, leading to stuff like
https://twitter.com/never_released/status/1101439626357686272
https://devblogs.microsoft.com/cppblog/spectre-mitigations-in-msvc/ describes
what the flag does.
We could maybe map it to -mspeculative-load-hardening
There's also a declspec for disabling spectre mitigations on a per-function
level: https://docs.microsoft.com/en-us/cpp/cpp/spectre?view=vs-2017
https://reviews.llvm.org/D51157 suggests that we already have something like
this on the IR level, so adding a declspec might not be too difficult.
Finally, there's a warning (C5045) which flags where the mitigation would be
inserted:
https://devblogs.microsoft.com/cppblog/spectre-diagnostic-in-visual-studio-2017-version-15-7-preview-4/
This part might be difficult.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190305/626fa67a/attachment.html>
More information about the llvm-bugs
mailing list