This is an archive of the discontinued LLVM Phabricator instance.

[Driver] specify -stack-protector 0 for -fno-stack-protector
AbandonedPublic

Authored by nickdesaulniers on Oct 28 2020, 3:37 PM.

Details

Reviewers
void
manojgupta
Summary

-fno-stack-protector now explicitly sets -stack-protector 0 for the
invocation of cc1. In turn, -stack-protector 0 will set nossp IR fn attr
on all functions defined in the translation unit.

Fixes pr/47479.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptOct 28 2020, 3:37 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
nickdesaulniers requested review of this revision.Oct 28 2020, 3:37 PM

Might be nice to add an integration test where -fno-stack-protector results in nossp function attributes (so -fno-stack-protector -> -stack-protector 0 -> nossp fn attrs).

Might be nice to add an integration test where -fno-stack-protector results in nossp function attributes (so -fno-stack-protector -> -stack-protector 0 -> nossp fn attrs).

Oh, this is covered somewhat by clang/test/CodeGen/stack-protector.c which was updated in parent commit D90194.

Bumping for review