mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
The JIT now passes the environment pointer to the main() function when it
starts a program. This allows the GNU env program to compile and JIT under LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8022 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
+2
-2
@@ -46,7 +46,7 @@ ExecutionEngine::~ExecutionEngine() {
|
||||
//===----------------------------------------------------------------------===//
|
||||
// main Driver function
|
||||
//
|
||||
int main(int argc, char** argv) {
|
||||
int main(int argc, char** argv, const char ** envp) {
|
||||
cl::ParseCommandLineOptions(argc, argv,
|
||||
" llvm interpreter & dynamic compiler\n");
|
||||
|
||||
@@ -98,7 +98,7 @@ int main(int argc, char** argv) {
|
||||
InputArgv.insert(InputArgv.begin(), InputFile);
|
||||
|
||||
// Run the main function!
|
||||
int ExitCode = EE->run(MainFunction, InputArgv);
|
||||
int ExitCode = EE->run(MainFunction, InputArgv, envp);
|
||||
|
||||
// Now that we are done executing the program, shut down the execution engine
|
||||
delete EE;
|
||||
|
||||
Reference in New Issue
Block a user