Skip to content

Commit 5cb31c2

Browse files
committed
builder: fix support for tcc on windows (openlibm.o)
1 parent 4653ed3 commit 5cb31c2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

vlib/v/builder/cc.v

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -785,6 +785,14 @@ fn (mut v Builder) build_thirdparty_obj_file(path string, moduleflags []cflag.CF
785785
if os.exists(opath) {
786786
return
787787
}
788+
if os.exists(obj_path) {
789+
// Some .o files are distributed with no source
790+
// for example thirdparty\tcc\lib\openlibm.o
791+
// the best we can do for them is just copy them,
792+
// and hope that they work with any compiler...
793+
os.cp(obj_path, opath)
794+
return
795+
}
788796
println('$obj_path not found, building it in $opath ...')
789797
cfile := '${path[..path.len - 2]}.c'
790798
btarget := moduleflags.c_options_before_target()

0 commit comments

Comments
 (0)