[PATCH] D90896: [Clang][Driver] default to nossp
Nick Desaulniers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 5 17:33:13 PST 2020
nickdesaulniers created this revision.
nickdesaulniers added reviewers: void, rnk.
Herald added subscribers: cfe-commits, jdoerfert, atanasyan, jrtc27, kbarton, nemanjai.
Herald added a project: clang.
nickdesaulniers requested review of this revision.
This patch does 2 things:
1. the default value of StackProtectorMode, StackProtectorMode::SSPOff now explicitly adds the `nossp` LLVM IR fn attr.
2. it makes -fno-stack-protector/\GS_ now explictly pass `-stack-protector 0` to cc1, which sets the StackProtectorMode to StackProtectorMode::SSPOff.
This allows safer mixing of translation units compiled with
-fno-stack-protector and -fstack-protector* for LTO, since LLVM IR fn
attr `nossp` will prevent inlining across the two.
Fixes pr/47479.
Alternative to D90194 <https://reviews.llvm.org/D90194>+D90348 <https://reviews.llvm.org/D90348>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D90896
Files:
clang/lib/CodeGen/CodeGenModule.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/CXX/special/class.dtor/p3-0x.cpp
clang/test/CodeGen/2008-04-08-NoExceptions.c
clang/test/CodeGen/address-safety-attr-flavors.cpp
clang/test/CodeGen/address-safety-attr.cpp
clang/test/CodeGen/address-space-field1.c
clang/test/CodeGen/alias.c
clang/test/CodeGen/arm-cmse-attr.c
clang/test/CodeGen/attr-mustprogress-0.c
clang/test/CodeGen/attr-mustprogress-0.cpp
clang/test/CodeGen/attr-mustprogress-1.c
clang/test/CodeGen/attr-mustprogress-1.cpp
clang/test/CodeGen/attr-naked.c
clang/test/CodeGen/attributes.c
clang/test/CodeGen/exceptions-seh-finally.c
clang/test/CodeGen/function-attributes.c
clang/test/CodeGen/incomplete-function-type-2.c
clang/test/CodeGen/memtag-attr.cpp
clang/test/CodeGen/micromips-attr.c
clang/test/CodeGen/mips-vector-arg.c
clang/test/CodeGen/mips16-attr.c
clang/test/CodeGen/mrtd.c
clang/test/CodeGen/ms-declspecs.c
clang/test/CodeGen/ppc64-complex-parms.c
clang/test/CodeGen/ppc64-complex-return.c
clang/test/CodeGen/ppc64-extend.c
clang/test/CodeGen/pragma-weak.c
clang/test/CodeGen/sanitize-thread-attr.cpp
clang/test/CodeGen/sanitize-thread-no-checking-at-run-time.m
clang/test/CodeGen/stackrealign-main.c
clang/test/CodeGen/unwind-attr.c
clang/test/CodeGen/xray-global-init.cpp
clang/test/CodeGenCXX/apple-kext.cpp
clang/test/CodeGenCXX/attr.cpp
clang/test/CodeGenCXX/cxx11-exception-spec.cpp
clang/test/CodeGenCXX/cxx11-noreturn.cpp
clang/test/CodeGenCXX/derived-to-base.cpp
clang/test/CodeGenCXX/exceptions-seh-filter-uwtable.cpp
clang/test/CodeGenCXX/global-dtor-no-atexit.cpp
clang/test/CodeGenCXX/global-init.cpp
clang/test/CodeGenCXX/microsoft-abi-array-cookies.cpp
clang/test/CodeGenCXX/no-exceptions.cpp
clang/test/CodeGenCXX/noinline-template.cpp
clang/test/CodeGenCXX/optnone-def-decl.cpp
clang/test/CodeGenCXX/reference-cast.cpp
clang/test/CodeGenCXX/threadsafe-statics.cpp
clang/test/CodeGenCXX/thunks.cpp
clang/test/CodeGenCXX/virtual-base-cast.cpp
clang/test/CodeGenObjC/gnu-exceptions.m
clang/test/CodeGenObjC/objc-literal-tests.m
clang/test/CodeGenObjCXX/lambda-expressions.mm
clang/test/CodeGenOpenCL/convergent.cl
clang/test/Driver/cl-options.c
clang/test/PCH/objc_container.m
clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.funcattrs.expected
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90896.303309.patch
Type: text/x-patch
Size: 45577 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201106/ccb63b83/attachment-0001.bin>
More information about the cfe-commits
mailing list