Open kverrier opened 5 years ago
@kverrier Thanks! Yeah, I haven't tested it with more than one file.
If you want to try, I think you can pass the module name override as the second-last parameter before the output.wasm parameter.
Thanks for the quick response!
No luck with that flag 😢 ... Looks like swiftc
doesn't like -o
when generating multiple files. Makes sense since this is outputting multiple object files:
$ ./swiftwasm file1.swift file2.swift -module-name "test" output.wasm
<unknown>:0: error: cannot specify -o when generating multiple output files
I'll experiment with a more traditional Makefile
in a small project and report my findings.
@kverrier The swiftwasm
script's main job is to set up the linker arguments - if you have those you should be ok.
(It's needed because we haven't added the right linker flags to swiftc yet, so it won't call wasm-ld for us)
Super cool project @zhuowei !
Ran into a little snag trying it out. Looks like the swiftwasm script doesn't support passing in multiple swift files and I get an error about an invalid module name.
Haven't look much further into the issue yet. I'll keep tinkering but would love any insights.