Fix compiler target check for wasm32-wasi#1116
Fix compiler target check for wasm32-wasi#1116polyrand wants to merge 3 commits intorusqlite:masterfrom
Conversation
|
This PR partially rollbacks #961 related to cross-compilation... |
|
I see. According to the
I can see why this is empty when using |
Maybe we should check both ? if env::var("TARGET") == Ok("wasm32-wasi".to_string()) || is_compiler("wasm32-wasi") { |
|
I've the same change in a local fork of This, however, is expected, as the docs state:
This is why I also had to define my own #[no_mangle]
extern "C" fn sqlite3_os_init() -> i32 {
ffi::sqlite3_vfs_register(CUSTOM_VFS, false as i32)
} |
|
@rkusa Have you enabled the rusqlite/libsqlite3-sys/build.rs Lines 244 to 252 in ddb7141 |
|
@trevyn Good call, Again, this is for my personal use-case. |
Codecov Report
@@ Coverage Diff @@
## master #1116 +/- ##
=======================================
Coverage 78.34% 78.34%
=======================================
Files 47 47
Lines 5808 5808
=======================================
Hits 4550 4550
Misses 1258 1258 Continue to review full report at Codecov.
|
Co-authored-by: Markus Ast <m@rkusa.st>
|
Status? |
|
I'll have a fix for this and a bunch of other issues in the build script later this weekend (ended up rewriting the build.rs to fix a ton of bugs, took longer than expected but basically all thats left is a bit more testing). Not sure why I didn't merge this earlier, but at this point it would just conflict. |
|
Ow, that sounds perfect! |
|
@thomcc looks like this is still an issue in main are you still planing on doing the other build.rs fixes and this in one go? |
When building with:
The
CARGO_CFG_TARGET_ENVis an empty string.The change can be verified by running the command above with and without this change. The build is failing in both cases (#827), but without this change, the
wasm32-wasi-specific flags:-DSQLITE_OS_OTHERandDLONGDOUBLE_TYPEare not being used byclang