EnzymeAD / rust

A rust fork to work towards Enzyme integration
https://www.rust-lang.org
Other
53 stars 7 forks source link

Support Windows/macOS #73

Open motabbara opened 5 months ago

motabbara commented 5 months ago

For this to work I also had to modify Enzyme CMakeLists.txt

Not sure whether these make sense so I guess this is more of a draft PR

CMakeLists.txt

ZuseZ4 commented 5 months ago

Thanks a lot! I looked through your CMakeList.txt changes and created this patch, can you make a PR for Enzyme core out of it? (I didn't had your gh email, so I couldn't commit in your name) patch.diff.txt Once that is merged I'll update the Enzyme submodule and merge this pr here.

Also, do you know what happened to your cargo.lock? It is ~7 times the original size, did you maybe run x or x.py from that folder? I am not sure why it would otherwise change so much.

Final question, on which systems could you test this? We hope to add CI soonish, but I didn't got to it yet, so only some Linux versions are really tested. Something like this should print it: rustc -Z unstable-options --print target-spec-json | grep llvm-target

ZuseZ4 commented 5 months ago

Also @motabbara, if you are currently free, we are discussing that in our weekly open Enzyme call at https://mit.zoom.us/j/96000853439

motabbara commented 5 months ago

Are the Cargo.lock changes important/significant?

@ZuseZ4 Do you want to merge this into macro2 instead?

I'll put it into macro2 and remove the lock file noise.

motabbara commented 5 months ago

Thanks a lot! I looked through your CMakeList.txt changes and created this patch, can you make a PR for Enzyme core out of it? (I didn't had your gh email, so I couldn't commit in your name) patch.diff.txt Once that is merged I'll update the Enzyme submodule and merge this pr here.

Also, do you know what happened to your cargo.lock? It is ~7 times the original size, did you maybe run x or x.py from that folder? I am not sure why it would otherwise change so much.

Final question, on which systems could you test this? We hope to add CI soonish, but I didn't got to it yet, so only some Linux versions are really tested. Something like this should print it: rustc -Z unstable-options --print target-spec-json | grep llvm-target

"llvm-target": "arm64-apple-macosx11.0.0",

ZuseZ4 commented 5 months ago

@motabbara, I went ahead and created a similar PR to Enzyme, since I just tried to rebuild rust-enzyme and ended up with similar errors. I additionally to your patch also had to update the BCLoader CMakeLists, and I didn't needed your Mac specific changes, so I left these for you.