I know this is silly, but if we receive object files instead of source files we should link them immediately (still using cc) instead of complaining that they are not UTF-8. This will make working with CMake and Make much easier because they expect the compiler to handle the full compilation pipeline and allow separating into multiple stages.
Example
$ swcc -o sample.o -c sample.c$ swcc -o sample sample.o
// second command currently tries to parse sample.o as source code and gives 'invalid UTF-8 error'
// should link sample.o into the sample executable
I know this is silly, but if we receive object files instead of source files we should link them immediately (still using
cc
) instead of complaining that they are not UTF-8. This will make working with CMake and Make much easier because they expect the compiler to handle the full compilation pipeline and allow separating into multiple stages.Example
$ swcc -o sample.o -c sample.c
$ swcc -o sample sample.o
// second command currently tries to parsesample.o
as source code and gives 'invalid UTF-8 error' // should linksample.o
into thesample
executable