Closed shaoboyan closed 2 weeks ago
cc @fs-eire @guschmue @snnn
Cross compiling LLVM is a bit complicated, and DXC is such an old version of LLVM that the modern LLVM instructions don't quite work for it.
The main thing that you need to do is build a local x64 build of DXC and you'll need to configure your arm64 build directory to use the x64 build's tablegen tools. You can do that with the CMake options:
-DLLVM_TABLEGEN=<path to x64 build>\bin\llvm-tblgen.exe
-DCLANG_TABLEGEN=<path to x64 build>\bin\clang-tblgen.exe
If you continue to have problems please re-open this issue.
Running cmake config command:
After configuration done, run build command
But get errors (For example):
Adding
-DCMAKE_CROSSCOMPILING=ON
doesn't help.It seems the built clang-tblgen.exe is arm based instead of x64 based. Is there any flag/switch to support cross-compiling?
NOTE: Following LLVM doc here https://llvm.org/docs/HowToCrossCompileLLVM.html and setting
-DLLVM_TARGETS_TO_BUILD=ARM
and-DLLVM_HOST_TRIPLE=aarch64-pc-win32
got errors in configuration step