You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was using xargo to cross-compile a project (to a musl target) which required the Rust std crate, and it failed while linking building libunwind, because clang-9 doesn't like the combination -std=c99 -std=c++11 used in src/libunwind/build.rs. I was able to work around this by simply commenting out the respective lines, but I think the build.rs script should be able to determine the compiler&version, and skip adding these flags if it detects a recent clang version, which seem to be more strict about this than recent GCC versions (which, as I've read, only produce a warning in that case).
It may help to separate compilation of libunwind's C (-std=c99) and C++ (-std=c++11) code, but I'm unsure how to inform the cc crate that it should use different flags for C and C++, and still linking them into the same static lib...
I was using
xargo
to cross-compile a project (to amusl
target) which required the Ruststd
crate, and it failed while linking buildinglibunwind
, because clang-9 doesn't like the combination-std=c99 -std=c++11
used insrc/libunwind/build.rs
. I was able to work around this by simply commenting out the respective lines, but I think thebuild.rs
script should be able to determine the compiler&version, and skip adding these flags if it detects a recent clang version, which seem to be more strict about this than recent GCC versions (which, as I've read, only produce a warning in that case).It may help to separate compilation of
libunwind
's C (-std=c99
) and C++ (-std=c++11
) code, but I'm unsure how to inform thecc
crate that it should use different flags for C and C++, and still linking them into the same static lib...related:
The text was updated successfully, but these errors were encountered: