aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/llc/llc.cpp1
-rw-r--r--tools/lto/LTOModule.cpp6
-rw-r--r--tools/opt/opt.cpp1
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;
}