My current local machine doesn’t meet Mojo’s GPU runtime requirements, and I’m currently unable to compile on it. Given that most modern programming languages and compilers support cross-compilation, I was wondering: does the Mojo compiler currently support this feature? If not, is it on the roadmap for the future?
Right now, I’m relying on cloud GPUs to learn Mojo. However, keeping a cloud instance running continuously is quite expensive, and having to repeatedly spin up and reconfigure the environment from scratch every time. If I could compile the executable locally and only use the cloud instance for execution, it would significantly improve the workflow and save costs.
Yes, it is very useful! I can really compile the mojo file on my computer. But when I scp the executable to the remote GPU target and run it, it will complain about can't load shared libraries: libKGENCompilerRTShared.so. I guess I need to compile locally by using -Xlinker -static, but I don’t have static libraries like libKGENCompilerRTShare.a.
So the question has changed interestingly. How to statically link a mojo executable?