Dear community people,
I have no problems with TVM running natively on Linux (and it works great!), but now I'm forced to use TVM for delpoyment on Windows. It looks like I'm missing something in my appempt to cross-compile, and therefore kindly asking for a help please. I've built llvm/clang both native and cross-compilation toolchains (x86_64-unknown-linux-gnu and x86_64-w64-mingw32) using the following guide: https://github.com/mstorsjo/llvm-mingw. I defined both 'target' and 'target_host' as 'llvm -mtriple=x86_64-w64-mingw32'. But when it comes to `lib.export_library ('/tmp/deploy_lib.dll', cc.cross_compiler ("x86_64-w64-mingw32-clang++",output_format="dll"))` the compilation command `x86_64-w64-mingw-clang++ --shared -fPIC -o /tmp/deploy_lib.dll /tmp/tmpxxx/lib0.o` fails because the lib0.o object file is in Linux ELF format. This lib0.o file is created by llvm_module.cc 'SaveToFile' method which runs a llvm pass. What I can't understand is how can I force it to create the object file in the PE format I need for cross-compiling for the exported dll? I'd greatly appreciate any help. Sincerely, Lev. --- [Visit Topic](https://discuss.tvm.ai/t/cross-compilation-for-windows/7698/1) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these emails, [click here](https://discuss.tvm.ai/email/unsubscribe/2bab6c15c4370d3d27d65eef66af9ec8007a46c010fb9d0e900fd6eda6ec4b72).