forked from OSchip/llvm-project
Claim --param ssp-buffer-size, even if the stack protector is not
active. llvm-svn: 163705
This commit is contained in:
parent
26d7a06da3
commit
85e2bbc3f8
|
@ -2346,17 +2346,19 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
if (StackProtectorLevel) {
|
if (StackProtectorLevel) {
|
||||||
CmdArgs.push_back("-stack-protector");
|
CmdArgs.push_back("-stack-protector");
|
||||||
CmdArgs.push_back(Args.MakeArgString(Twine(StackProtectorLevel)));
|
CmdArgs.push_back(Args.MakeArgString(Twine(StackProtectorLevel)));
|
||||||
|
}
|
||||||
|
|
||||||
// --param ssp-buffer-size=
|
// --param ssp-buffer-size=
|
||||||
for (arg_iterator it = Args.filtered_begin(options::OPT__param),
|
for (arg_iterator it = Args.filtered_begin(options::OPT__param),
|
||||||
ie = Args.filtered_end(); it != ie; ++it) {
|
ie = Args.filtered_end(); it != ie; ++it) {
|
||||||
StringRef Str((*it)->getValue(Args));
|
StringRef Str((*it)->getValue(Args));
|
||||||
if (Str.startswith("ssp-buffer-size=")) {
|
if (Str.startswith("ssp-buffer-size=")) {
|
||||||
|
if (StackProtectorLevel) {
|
||||||
CmdArgs.push_back("-stack-protector-buffer-size");
|
CmdArgs.push_back("-stack-protector-buffer-size");
|
||||||
// FIXME: Verify the argument is a valid integer.
|
// FIXME: Verify the argument is a valid integer.
|
||||||
CmdArgs.push_back(Args.MakeArgString(Str.drop_front(16)));
|
CmdArgs.push_back(Args.MakeArgString(Str.drop_front(16)));
|
||||||
(*it)->claim();
|
|
||||||
}
|
}
|
||||||
|
(*it)->claim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue