[PATCH] D46881: [X86][CET] Changing -fcf-protection behavior to comply with gcc (clang part)

Mikhail Dvoretckii via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 15 07:42:54 PDT 2018


mike.dvoretsky created this revision.
mike.dvoretsky added a reviewer: craig.topper.
Herald added a subscriber: cfe-commits.

This patch aims to match the changes introduced in gcc by https://gcc.gnu.org/ml/gcc-cvs/2018-04/msg00534.html. The -mibt feature flag is being removed, and the -fcf-protection option now also defines a __CET__ macro and causes errors when used on non-X86 targets, while X86 targets no longer check for -mibt and -mshstk to determine if -fcf-protection is supported. -mshstk is now used only to determine availability of shadow stack intrinsics.

Comes with an LLVM patch.


Repository:
  rC Clang

https://reviews.llvm.org/D46881

Files:
  clang/docs/ClangCommandLineReference.rst
  clang/include/clang/Basic/DiagnosticCommonKinds.td
  clang/include/clang/Basic/TargetInfo.h
  clang/include/clang/Driver/Options.td
  clang/lib/Basic/TargetInfo.cpp
  clang/lib/Basic/Targets/X86.cpp
  clang/lib/Basic/Targets/X86.h
  clang/lib/Frontend/CompilerInvocation.cpp
  clang/test/CodeGen/attributes.c
  clang/test/CodeGen/builtins-x86.c
  clang/test/CodeGen/x86-cf-protection.c
  clang/test/Driver/x86-target-features.c
  clang/test/Preprocessor/x86_target_features.c
  clang/test/Sema/attr-nocf_check.c
  clang/test/Sema/attr-nocf_check.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46881.146819.patch
Type: text/x-patch
Size: 12788 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180515/b5e607e7/attachment-0001.bin>


More information about the cfe-commits mailing list