Compiler: Add early error for output path being a directory.

- Introduce new `Path` type and an array of build paths on the build context.
- Resolve input and output paths/files early (before parsing).
- Error early if inputs are missing or outputs are directories.
- Plumb new file path generation into linker stage instead of its adhoc method.

TODO:
- Remove more adhoc file path generation in parser and linker stage.
- Make intermediate object file generation use new path system.
- Round out and robustify Path helper functions.
This commit is contained in:
Jeroen van Rijn
2022-04-06 18:26:23 +02:00
parent 5422a3b17e
commit 3cab2592c3
15 changed files with 676 additions and 406 deletions
-1
View File
@@ -87,7 +87,6 @@ bool lb_init_generator(lbGenerator *gen, Checker *c) {
return false;
}
String init_fullpath = c->parser->init_fullpath;
if (build_context.out_filepath.len == 0) {