Repository navigation
ohttp: build: use proper target OS for bindgen - #98
Conversation
martinthomson
left a comment
There was a problem hiding this comment.
Quite right. Cross compilation support has never been a high priority here; if this is all it takes, then I'm surprised, but pleased.
|
There are other uses of consts::OS in the build script, but I'm not entirely sure whether they're right or not. I know that at least this patch applied to the vendored version in the firefox tree gets the crate to build on my windows-on-mac scenario (which then fails later because of course, that'd be too easy 😉 ). |
When running bindgen, we can't use std::env::consts::OS as it will be the host OS in the build script, rather than the target one. It doesn't matter much for Linux and Windows as the defined constants don't appear to be used anywhere (at least in the Firefox build), the code relying instead on other values such as `__linux__` (compiler-defined) or `XP_WIN`.
49bd48e to
32bc9cf
Compare
|
That last push is just to fix the author info, I had a mishap with my git config. |
|
I took a quick look at the other uses of |
When running bindgen, we can't use std::env::consts::OS as it will be the host OS in the build script, rather than the target one. It doesn't matter much for Linux and Windows as the defined constants don't appear to be used anywhere (at least in the Firefox build), the code relying instead on other values such as
__linux__(compiler-defined) orXP_WIN.