Thanks for your reply! Sorry I'm not sure I got your meaning, so I will just write what I thoughts here:
Normally in a project we are referring to binaries if we specify an output file name without extensions. Such as the following:
$(LD) $(LDFLAGS) main.o lib.so -o main
Here the generated main file usually is a binary, however, emcc would emit a bitcode file, we have to do more steps here:
$ cp main main.bc
$ emcc main.bc -o main.js
The cp is here because emcc uses extensions to distinguish file type(or maybe I'm wrong here? Is there a better way?). So if we have to go through this copy and linking everywhere, why not just emit the JavaScript file at first place(the main file)?
I didn't mean here that we should change the spec. I just didn't quite understand here what you mean by "fitting into project build systems". Is there anything I'm missing? I would really appreciate it if you can help me point it out:)
- Xuejie Xiao