apache / mynewt-newt

An OS to build, deploy and securely manage billions of devices
https://mynewt.apache.org/
Apache License 2.0
117 stars 96 forks source link

Add Cflags and Include paths to pre_build_cmds environment #409

Closed caspermeijn closed 4 years ago

caspermeijn commented 4 years ago

Add the CFLAGS and INCLUDE_PATH as used by newt to the environment when starting a pre_build_cmd. I need this to execute rust bindgen correctly. This program will parse the mynewt headers and generate rust code from that and therefore it needs the correct c-flags and include paths.

BrandonArp commented 4 years ago

I'm using this branch and it perfectly solves the bindgen problem from Rust. I would love to see this get merged.