support clang and other compilers

This commit is contained in:
Venelin
2024-05-27 10:26:30 +03:00
parent 0b625dc84d
commit cf3663b348
3 changed files with 19 additions and 5 deletions
+10
View File
@@ -14,6 +14,9 @@
using namespace std;
namespace fs = std::filesystem;
namespace
{
struct MappedFile // todo: move to utils
{
// ~MappedFile()
@@ -55,6 +58,8 @@ fs::path src_file;
fs::path cache_dir;
fs::path bin; // cache bins to avoid recompiles
}
int main(int argc, char* argv[])
{
int src_arg = parse_args_until_src(argc, argv);
@@ -81,6 +86,9 @@ int main(int argc, char* argv[])
exec(run);
}
namespace
{
int parse_args_until_src(int argc, char* argv[])
{
if(argc < 2)
@@ -285,3 +293,5 @@ bool is_src_file(const string_view p)
else
return false;
}
}