aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-06-21 00:14:18 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-06-21 00:14:18 +0000
commitca6b90d8afd4f89dcde24473403fd19e1974d129 (patch)
treee3c6daa95812304bfdcd73cb1f59d785a5d27ccd /clang/lib/CodeGen/BackendUtil.cpp
parente5cc4b6330bdebc7f94bd8e27f7af9d29d9040fd (diff)
downloadllvm-ca6b90d8afd4f89dcde24473403fd19e1974d129.zip
llvm-ca6b90d8afd4f89dcde24473403fd19e1974d129.tar.gz
llvm-ca6b90d8afd4f89dcde24473403fd19e1974d129.tar.bz2
Add support for -Wa,--noexecstack when building from a non-assembly file. For
an assembly file it worked correctly, while for a .c file it would given an error about how --noexecstack is not a supported argument to -Wa. llvm-svn: 133489
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index 01d15ff..90aff7c 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -275,6 +275,8 @@ bool EmitAssemblyHelper::AddEmitPasses(BackendAction Action,
TM->setMCSaveTempLabels(true);
if (CodeGenOpts.NoDwarf2CFIAsm)
TM->setMCUseCFI(false);
+ if (CodeGenOpts.NoExecStack)
+ TM->setMCNoExecStack(true);
// Create the code generator passes.
PassManager *PM = getCodeGenPasses();