Description
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...
related:
Activity
fogti commentedon Jun 24, 2020
closed as DUP.