Repository navigation
Fix builing for ubuntu-latest - #37
Conversation
90fe9b9 to
901c80a
Compare
-ffrestanding forces libclang not to use the host's libraries. `cc` compiles with GCC which includes its own platform specific libraries so it works fine regardless of the environment regardless of the available libraries, but libclang used by bindgen gets confused on systems with multiple clang versions installed without this flag and loads the wrong version's headers instead of its own.
901c80a to
718a3a4
Compare
There was a problem hiding this comment.
-ffreestanding has the side effect of setting -fno-builtin which has effects on performance and code size, so I would only enable it if really necessary for the compilation.
Should we directly release the change? I think we need it to fix the CI in other projects.
|
If we are not sure about the implications, we could also move the option behind a feature flag and leave the choice to the user. |
|
It's only enabled for the bindgen pass, not for the |
|
I'll make it into a release. |
Yes, that’s what I meant (because you raised the question of whether to use it for the compilation too in the PR text) – using it for bindgen should be fine, for the build we should be more careful. |
-ffrestanding forces libclang not to use the host's libraries.
cccompiles with GCC which includes its own platform specific libraries so it works fine regardless of the environment regardless of the available libraries, but libclang used by bindgen gets confused on systems with multiple clang versions installed without this flag and loads the wrong version's headers instead of its own.I'm honestly not fully certain of the implications for all downstreams, if this could cause issues, and if it should not be used for
cctoo.