Add possibility to set memory limit for binaries run via libSystem. This

is especially needed for bugpoint. This partly implements PR688


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34349 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anton Korobeynikov
2007-02-16 19:11:07 +00:00
parent bdf44b929f
commit 9ba8a76f8b
16 changed files with 97 additions and 37 deletions

View File

@@ -64,7 +64,8 @@ public:
const std::string &OutputFile,
const std::vector<std::string> &GCCArgs =
std::vector<std::string>(),
unsigned Timeout = 0);
unsigned Timeout = 0,
unsigned MemoryLimit = 0);
/// MakeSharedObject - This compiles the specified file (which is either a .c
/// file or a .s file) into a shared object.
@@ -124,7 +125,8 @@ public:
std::vector<std::string>(),
const std::vector<std::string> &SharedLibs =
std::vector<std::string>(),
unsigned Timeout = 0) = 0;
unsigned Timeout = 0,
unsigned MemoryLimit = 0) = 0;
};
//===---------------------------------------------------------------------===//
@@ -156,7 +158,8 @@ public:
std::vector<std::string>(),
const std::vector<std::string> &SharedLibs =
std::vector<std::string>(),
unsigned Timeout = 0);
unsigned Timeout = 0,
unsigned MemoryLimit = 0);
/// OutputCode - Compile the specified program from bytecode to code
/// understood by the GCC driver (either C or asm). If the code generator
@@ -196,7 +199,8 @@ public:
std::vector<std::string>(),
const std::vector<std::string> &SharedLibs =
std::vector<std::string>(),
unsigned Timeout = 0);
unsigned Timeout = 0,
unsigned MemoryLimit = 0);
virtual GCC::FileType OutputCode(const std::string &Bytecode,
sys::Path &OutFile);