From bbea7168326d810eff18dfb8bc43c7790fd55010 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 13 Apr 2010 00:38:24 +0000 Subject: add frontend support for -fdata-sections and -ffunction-sections, patch by Sylvere Teissier! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101108 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/CodeGenAction.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/Frontend/CodeGenAction.cpp') diff --git a/lib/Frontend/CodeGenAction.cpp b/lib/Frontend/CodeGenAction.cpp index 7ed702ed51..fdce21170e 100644 --- a/lib/Frontend/CodeGenAction.cpp +++ b/lib/Frontend/CodeGenAction.cpp @@ -261,6 +261,9 @@ bool BackendConsumer::AddEmitPasses() { TargetMachine::setAsmVerbosityDefault(CodeGenOpts.AsmVerbose); + TargetMachine::setFunctionSections(CodeGenOpts.FunctionSections); + TargetMachine::setDataSections (CodeGenOpts.DataSections); + // FIXME: Parse this earlier. if (CodeGenOpts.RelocationModel == "static") { TargetMachine::setRelocationModel(llvm::Reloc::Static); -- cgit v1.2.3-70-g09d2