Adds the source file filename to workspace w, as if it were passed on the command line.
#import "File";
#run {
path := tprint("%/extra.jai", #filepath);
write_entire_file(path, "extra :: 1;");
w := compiler_create_workspace("from file");
options := get_build_options(w);
options.output_type = .NO_OUTPUT;
set_build_options(options, w);
add_build_file(path, w);
}
main :: () {}Doesn't run in the browser (skipped on wasm).
add_build_file :: (filename: string, w: Workspace, loc := #caller_location)
Parameters
- filename: string
- w: Workspace
- loc := #caller_location