emscripten not passing -s options to emcc?
// --target wasm32-unknown-emscripten
cc::Build::new()
.flag("-s")
.flag("FULL_ES3=1")
.file("sokol.c")
.compile("test")
;
a build session like this, I'm trying to emulate the command emcc -s FULL_ES3=1 sokol.c, but the .flag("-s").flag("FULL_ES3=1") part didn't seem to get work, I'm getting the same error message as it's not passed. If I feed something that'll sure fail like .flag("-s").flag("ENVIRONMENT=123") it won't fail, makes me suspect emcc didn't receive the options at all (or I'm doing the wrong way)?
The cc crate should print out the command its executing, does the command look like you'd expect?
@alexcrichton It does, running with -vv gives
running: "emcc" "-O0" ... "-s" "FULL_ES3=1" "-DSOKOL_GLES3" "-o" ...
there is -s FULL_ES3=1 in the command, but it's giving error message as if this option is not passed
After some tweaking I seem to break it more.. Now I'm getting a lot of undefined symbol errors, as if I'm not passing the file(c_file) option. Not getting any of these on other non-emscripten targets.
Sorry I don't really know anything about Emscripten. It sounds like this is not an issue wit hhis crate, however, and is likely an issue with your setup and/or emcc?
It doesn't really seem to be cc's problem to me too, but running raw equivalent emcc command doesn't have this problem, and a minimal int add(int a, int b); example works, just breaks when I'm trying to bind this c library, weird
Sorry I can't really help you myself, I don't really know how to debug Emscripten.
@alexcrichton Sure! Never mind