fix(build): handle assembly and reject sources meowc cannot compile

This commit is contained in:
milner committed 2022-07-25 11:49:47 +00:00
1 parent 84fae96b16
commit b3a2340a22
4 files changed
+30 -11

No files matched your search

+7
View File
@@ -134,6 +134,13 @@ let sources_of ~extra ((b : block), base) (t : target) =
Diag.error ~span:b.nspan
~hint:(Printf.sprintf "no file matches %s" (String.concat " " pats))
"%s %s matched no sources" b.kind b.bname;
List.iter
(fun f ->
if lang_opt f = None then
Diag.error ~span:b.nspan
~hint:("meowc compiles " ^ String.concat " " source_exts)
"%s %s lists %s, which is not a source meowc can compile" b.kind b.bname f)
files;
let gen, real = List.partition (fun f -> List.mem f extra) files in
{ t with srcs = real; gen_srcs = gen }