frankpfenning / C0

C0 Language
4 stars 0 forks source link

Bytecode emission picks wrong local directory #22

Closed robsimmons closed 11 years ago

robsimmons commented 11 years ago
cc0 -d tests/arith.c0 -o tests/arith
cc0 -d -b tests/arith.c0 -o tests/arith.bc0
Io: openOut "tests/tests/arith.bc0" failed with SysErr: No such file or directory [noent]

The culprit is line 395 in top.sml

val bcfile = path_concat (out_dir, bname)

We should just use bname, the user-provided output path, instead of bcname. This does mean that the default bname (no -o will need to join the directory back on to the filename when bname is generated, but that seems fine.

robsimmons commented 11 years ago

I believe I've checked in a fix to this in r133