The Kraken compiler now compiles programs automatically, moving this functionality from the tester in preperation for making test_compiler not a test

This commit is contained in:
Nathan Braswell
2016-01-24 03:14:24 -05:00
parent 105a969a00
commit 9f714dc9ec
5 changed files with 12 additions and 9 deletions

View File

@@ -37,9 +37,12 @@ void CGenerator::generateCompSet(std::map<std::string, NodeTree<ASTData>*> ASTs,
buildString += linkerString;
buildString += "-o " + outputName;
std::ofstream outputBuild;
outputBuild.open(outputName + "/" + split(outputName, '/').back() + ".sh");
std::string scriptName = split(outputName, '/').back() + ".sh";
outputBuild.open(outputName + "/" + scriptName);
outputBuild << buildString;
outputBuild.close();
std::cout << "KRAKEN COMPILING DONE, CALLING C COMPILER" << std::endl;
ssystem("cd " + outputName + "/; sh " + scriptName);
std::cout << "DEFER DOUBLE STACK " << deferDoubleStack.size() << std::endl;
}