Skip to content

Commit 5413a25

Browse files
committed
checker: allow for v -is_o -o x mm.v, where mm.v starts with module abc (i.e. not just module main)
1 parent c74c9e4 commit 5413a25

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎vlib/v/checker/checker.v‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,10 @@ pub fn (mut c Checker) check_files(ast_files []&ast.File) {
458458
// shared libs do not need to have a main
459459
return
460460
}
461+
if c.pref.is_o {
462+
// .o files also do not need main
463+
return
464+
}
461465
if c.pref.no_builtin {
462466
// `v -no-builtin module/` do not necessarily need to have a `main` function
463467
// This is useful for compiling linux kernel modules for example.

0 commit comments

Comments
 (0)