tomhrr / dale

Lisp-flavoured C
BSD 3-Clause "New" or "Revised" License
1.02k stars 48 forks source link

`-o` argument is ignored during module compilation #222

Closed tomhrr closed 1 year ago

tomhrr commented 1 year ago
$ cat test.dt 
(module test)

(def f (fn extern-c int (void) 123))
$ dalec -c test.dt -o test.dt.o
$ nm test.dt.o
nm: test.dt.o: no symbols
$ cat test-nomod.dt
(def f (fn extern-c int (void) 123))
$ dalec -c test-nomod.dt -o test-nomod.dt.o
$ nm test-nomod.dt.o
0000000000000000 T f
$

The first dalec call should produce a test.dt.o file that has the same content as test-nomod.dt.o.

tomhrr commented 1 year ago

Module compilation now produces an object file, which is (hopefully) a slightly neater way of fixing this.