runtime/src/main.cpp
TheBrokenRail bfbb477f60
Some checks failed
CI / Test (ARM64) (push) Failing after 2m58s
CI / Test (AMD64) (push) Failing after 2m48s
CI Attempt
2025-02-15 00:04:19 -05:00

25 lines
521 B
C++

#include "log.h"
#include "pipe/main.h"
#ifdef MCPI_HAS_QEMU
#include "syscall/main.h"
#endif
// Main
int main(int argc, char *argv[]) {
// Check Arguments
if (argc < 2) {
ERR("Invalid Arguments");
}
// Update Arguments
argc--;
argv++;
// Create Implementation
Implementation *impl = new PipeImplementation;
#ifdef MCPI_HAS_QEMU
if (!is_trampoline_pipe_based()) {
delete impl;
impl = new SyscallImplementation;
}
#endif
return impl->main(argc, argv);
}