Skip to content

Commit 67b564b

Browse files
committed
Fix build with Yocto and latest cc crate
Recently, there were a few amount of changes (and partially reverted) changes to the way the cc crate determines the correct compiler arguments. See also rust-lang/cc-rs#1297 and linked issues for discussion. The general advice is that it should not be necesary to call target(), and in the case of some arm Yocto builds it's even harmful: When building for arm-poky-linux-gnueabi (a very typical target) and calling target() with that during the skia-bindings build, cc-rs "parses" that the compiler should use soft-float and adds `-mfloat-abi=soft`, while `CC` already has `-mfloat-abi=hard`. Specifying both on the command line means that GCC will abort. By not calling target(), we stick to cc-rs' own heuristics of determining what's needed, and that works here (avoids adding the conflicting option).
1 parent 8df1749 commit 67b564b

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

skia-bindings/build_support/skia_bindgen.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,6 @@ pub fn generate_bindings(
250250
// environment, for example when targeting the ios simulator.
251251
if override_target {
252252
cc_args.push(format!("--target={target_str}"));
253-
} else {
254-
cc_build.target(target_str);
255253
}
256254
bindgen_args.push(format!("--target={target_str}"));
257255
}

0 commit comments

Comments
 (0)