[PATCH] D92245: -fstack-clash-protection: Return an actual error when used on unsupported OS
serge via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 30 00:49:12 PST 2020
serge-sans-paille added inline comments.
================
Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:276-277
"-fembed-bitcode is not supported on versions of iOS prior to 6.0">;
+def err_drv_stack_clash_protection_unsupported_on_toolchain : Error<
+ "-fstack-clash-protection is not supported on Windows or Mac OS X">;
----------------
kristof.beyls wrote:
> There are more OSes than Linux, Windows or OSX.
> Maybe it's somewhat better to say "-fstack-clash-protection is not supported on %0", with the targeted OS being fed in.
> If that is not easily possible, maybe just say "-fstack-clash-protection is not supported on the targeted OS"?
> Maybe it's somewhat better to say "-fstack-clash-protection is not supported on %0", with the targeted OS being fed in.
I second that one.
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3084
- if (!EffectiveTriple.isOSLinux())
+ if (EffectiveTriple.isOSWindows() || EffectiveTriple.isOSDarwin()) {
+ D.Diag(diag::err_drv_stack_clash_protection_unsupported_on_toolchain);
----------------
In that case you should probably allow explicitly the different Linux flavors here
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92245/new/
https://reviews.llvm.org/D92245
More information about the cfe-commits
mailing list