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: unassignedclangb...@nondot.org
Reporter: nicolaswe...@gmx.de
CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
richard-l...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs