Theseus icon indicating copy to clipboard operation
Theseus copied to clipboard

Add `local_rust` option to Makefile

Open tsoutsman opened this issue 3 years ago • 2 comments

I haven't worked with make much, so this may be a terrible way to do it. It definitely feels terrible.

This way of doing it unnecessarily forces us to rebuild core and alloc, but I'm not sure if it's possible to clean out just std using x.py. This is something we can look into in the future.

Running x.py from anywhere other than the rust repo directory doesn't work, so we cd $(local_std) rather than run $(local_std)/x.py.

Signed-off-by: Klim Tsoutsman [email protected]

tsoutsman avatar Aug 14 '22 08:08 tsoutsman

The issue is I want to run the entire build target (e.g. merge sections, copy crate objects, strip files, etc.), but I'm not sure how to create a new target without duplicating all of $(nano_core_binary) and switching it to rely on my different cargo target.

The CI build fails because it uses --all-features which also enables the newly added std feature which relies on this special build process. I'm merging this into std_dep so I'm not sure how big of an issue that is.

tsoutsman avatar Aug 18 '22 10:08 tsoutsman

I see. Can you not just define a new target that sets whatever makefile env vars you need, and then either depends on the existing build, etc targets, or invokes them directly?

kevinaboos avatar Aug 18 '22 18:08 kevinaboos