diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2013-07-13 01:00:17 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2013-07-13 01:00:17 +0000 |
commit | 12c74dc2c2ee306f60fb39a9b2a43000e23addcc (patch) | |
tree | 1a4a03195d8312595fa1479be4618bafdffe86ab /tools | |
parent | 1dedabdfad8f3412256e706905b9b3b69aa2e17a (diff) | |
download | external_llvm-12c74dc2c2ee306f60fb39a9b2a43000e23addcc.zip external_llvm-12c74dc2c2ee306f60fb39a9b2a43000e23addcc.tar.gz external_llvm-12c74dc2c2ee306f60fb39a9b2a43000e23addcc.tar.bz2 |
Revert commit r186217 -- this is breaking bots:
http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-nobootstrap-RAincremental/builds/4328
Original commit log:
Use the function attributes to pass along the stack protector buffer
size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186234 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/llc/llc.cpp | 1 | ||||
-rw-r--r-- | tools/lto/LTOModule.cpp | 6 | ||||
-rw-r--r-- | tools/opt/opt.cpp | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index 9f6be81..bcabafc 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -280,6 +280,7 @@ static int compileModule(char **argv, LLVMContext &Context) { Options.PositionIndependentExecutable = EnablePIE; Options.EnableSegmentedStacks = SegmentedStacks; Options.UseInitArray = UseInitArray; + Options.SSPBufferSize = SSPBufferSize; OwningPtr<TargetMachine> target(TheTarget->createTargetMachine(TheTriple.getTriple(), diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp index 5ee43ba..6220dd1 100644 --- a/tools/lto/LTOModule.cpp +++ b/tools/lto/LTOModule.cpp @@ -151,6 +151,11 @@ UseInitArray("use-init-array", cl::desc("Use .init_array instead of .ctors."), cl::init(false)); +static cl::opt<unsigned> +SSPBufferSize("stack-protector-buffer-size", cl::init(8), + cl::desc("Lower bound for a buffer to be considered for " + "stack protection")); + LTOModule::LTOModule(llvm::Module *m, llvm::TargetMachine *t) : _module(m), _target(t), _context(_target->getMCAsmInfo(), _target->getRegisterInfo(), NULL), @@ -256,6 +261,7 @@ void LTOModule::getTargetOptions(TargetOptions &Options) { Options.PositionIndependentExecutable = EnablePIE; Options.EnableSegmentedStacks = SegmentedStacks; Options.UseInitArray = UseInitArray; + Options.SSPBufferSize = SSPBufferSize; } LTOModule *LTOModule::makeLTOModule(MemoryBuffer *buffer, diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index fa1cd43..6fc8d67 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -510,6 +510,7 @@ static TargetOptions GetTargetOptions() { Options.PositionIndependentExecutable = EnablePIE; Options.EnableSegmentedStacks = SegmentedStacks; Options.UseInitArray = UseInitArray; + Options.SSPBufferSize = SSPBufferSize; return Options; } |