We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c553e8e commit e9e4836Copy full SHA for e9e4836
src/libunwind/build.rs
@@ -56,12 +56,18 @@ mod llvm_libunwind {
56
pub fn compile() {
57
let target_env = env::var("CARGO_CFG_TARGET_ENV").unwrap();
58
let target_vendor = env::var("CARGO_CFG_TARGET_VENDOR").unwrap();
59
+ let target_endian_little = env::var("CARGO_CFG_TARGET_ENDIAN").unwrap() != "big";
60
let cfg = &mut cc::Build::new();
61
62
cfg.cpp(true);
63
cfg.cpp_set_stdlib(None);
64
cfg.warnings(false);
65
66
+ // libunwind expects a __LITTLE_ENDIAN__ macro to be set for LE archs, cf. #65765
67
+ if target_endian_little {
68
+ cfg.define("__LITTLE_ENDIAN__", Some("1"));
69
+ }
70
+
71
if target_env == "msvc" {
72
// Don't pull in extra libraries on MSVC
73
cfg.flag("/Zl");
0 commit comments