esp-rs / embuild

Build support for embedded Rust: Cargo integration with other embedded build ecosystems & tools, like PlatformIO, CMake and kconfig.
Apache License 2.0
139 stars 40 forks source link

Fails to build when platform-specific overrides are necessary in tools.json #87

Closed tomstokes closed 4 months ago

tomstokes commented 4 months ago

The custom tools parsing code from https://github.com/esp-rs/embuild/pull/85 does not process the overrides from tools.json.

This breaks the build on macOS and likely several other platforms. PR incoming to fix it.

Vollbrecht commented 4 months ago

Thanks for the PR's i will review them tomorrow! Its sleep time for me now.

Only one heads up regarding the matching off the ARCH. The linked rust documentation at that point doesn't help because it only shows some possible values. Still possible wrong the way it is currently. I think rust itself takes the value from the target-description, and if we check at least the supported platforms or better directly check in the rustc source, we should check the arch value inside the target description.

If my memory is not totally wrong you can compile against rpi3 for example with armv7_unknown_linux_muslabi as well as armv7_unknown_linux_gnuabi(hf). In that cases it really seams to only use "arm" as the ARCH value. Question is if that is consistent for the rest of the target in that list.

tomstokes commented 4 months ago

Question is if that is consistent for the rest of the target in that list.

That's a good question. I spot checked a few of the rust compiler Target definitions before I submitted the PR, but I didn't check all of them. The ones I saw used arm, but of course that doesn't mean there's not a different one hidden in there somewhere.

Vollbrecht commented 4 months ago

closed with #88