diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-01-23 17:55:27 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-01-23 17:55:27 +0000 |
commit | 96aa78c8c5ef1a5f268539c9edc86569b436d573 (patch) | |
tree | e664056c0f0a8ce32c72d19cf0f0ae1e8eefd038 /tools | |
parent | 584520e8e2c1f8cc04bc8dd4dc4ea6c390627317 (diff) | |
download | external_llvm-96aa78c8c5ef1a5f268539c9edc86569b436d573.zip external_llvm-96aa78c8c5ef1a5f268539c9edc86569b436d573.tar.gz external_llvm-96aa78c8c5ef1a5f268539c9edc86569b436d573.tar.bz2 |
Add support for the --noexecstack option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124077 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/llvm-mc/llvm-mc.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp index 8708204..2c22bed 100644 --- a/tools/llvm-mc/llvm-mc.cpp +++ b/tools/llvm-mc/llvm-mc.cpp @@ -69,6 +69,9 @@ static cl::opt<bool> RelaxAll("mc-relax-all", cl::desc("Relax all fixups")); static cl::opt<bool> +NoExecStack("mc-no-exec-stack", cl::desc("File doesn't need an exec stack")); + +static cl::opt<bool> EnableLogging("enable-api-logging", cl::desc("Enable MC API logging")); enum OutputFileType { @@ -336,6 +339,7 @@ static int AssembleInput(const char *ProgName) { TM->getTargetLowering()->getObjFileLowering(); const_cast<TargetLoweringObjectFile&>(TLOF).Initialize(Ctx, *TM); + // FIXME: There is a bit of code duplication with addPassesToEmitFile. if (FileType == OFT_AssemblyFile) { MCInstPrinter *IP = TheTarget->createMCInstPrinter(OutputAsmVariant, *MAI); @@ -355,7 +359,8 @@ static int AssembleInput(const char *ProgName) { MCCodeEmitter *CE = TheTarget->createCodeEmitter(*TM, Ctx); TargetAsmBackend *TAB = TheTarget->createAsmBackend(TripleName); Str.reset(TheTarget->createObjectStreamer(TripleName, Ctx, *TAB, - FOS, CE, RelaxAll)); + FOS, CE, RelaxAll, + NoExecStack)); } if (EnableLogging) { |