rust-lang/cc-rs

Unknown target error since 1.1.32

SamRodri opened this issue · 2 comments

This no longer builds:

[dependencies]
zng-swgl = "0.3.0"
# cc = "=1.1.31" # version that works
  --- stderr


  error occurred: unknown target `SWGLPP`

The build script file is here: build.rs. I'm not actually familiar with this code, as it is a fork of webrender's build.rs. The relevant code is probably:

let mut build = cc::Build::new();

// ..

// Use SWGLPP target to avoid pulling CFLAGS/CXXFLAGS.
build.target("SWGLPP");

// ..

Does the target method only expects Rust targets?

I think you'd have to remove this

// Use SWGLPP target to avoid pulling CFLAGS/CXXFLAGS.
build.target("SWGLPP");

If you don't want the default c/cxx flags we supplied, you can use Build::no_default_flags

Thanks, the build is fixed with your suggested changes.

I guess this was just an old hack, using an invalid target on purpose.