35 lines
684 B
C++
Raw Normal View History

2024-09-21 16:59:55 +03:00
#include "pch.h"
2024-09-21 21:47:34 +03:00
#include "test_recompiler.h"
int main(int argc, char* argv[])
2024-09-07 18:00:09 +06:00
{
const char* path =
#ifdef CONFIG_FILE_PATH
CONFIG_FILE_PATH
#else
argv[1]
#endif
;
if (std::filesystem::is_regular_file(path))
2024-09-21 21:47:34 +03:00
{
Recompiler recompiler;
recompiler.LoadConfig(path);
2024-09-21 21:47:34 +03:00
recompiler.Analyse();
2024-09-28 22:44:27 +06:00
auto entry = recompiler.image.symbols.find(recompiler.image.entry_point);
if (entry != recompiler.image.symbols.end())
{
entry->name = "_xstart";
}
recompiler.Recompile();
2024-09-21 21:47:34 +03:00
}
else
{
TestRecompiler::RecompileTests(path, argv[2]);
2024-09-21 21:47:34 +03:00
}
2024-09-09 23:23:04 +06:00
2024-09-07 18:21:08 +06:00
return 0;
}