Build function for projects with multiple Translation Units

The thing with the hotloading dlls approach is that you can get most of the speed up you want by just recompiling the one you've changed and only that one, which managing for you is the entire point of make
Right, and when I upgrade to Super! I'll just code in a more specialized Build function that triggers cl for which translation unit I'm current working in, or something like that.
This might be a little bit insane, but I've (as of today) taken to using
1
2
3
4
5
result = standard_build_search(app, view,
                                       active_buffer,
                                       &dir_copy, command, perform_backup, false,
                                       make_lit_string("_build.c"),
                                       make_lit_string("\"tcc -run _build.c\""));
as my build command and using _spawnvp() within _build.c to call clang to compile stuff but anyone using the non-super version could just as easily call TCC from a .bat and do the same thing (if you don't mind depending on TCC or writing your build scripts in C) or for that matter you could use any other compiler and just do something like:
1
2
cc -c _build.c -o build.exe
build.exe

or
1
2
cl.exe _build.c /DEBUG /Z7 /link /out:build.exe
build.exe

Edited by Michael Cameron on