Open MrHighVoltage opened 1 year ago
What clang version are you using? OpenVAF requires a full LLVM toolchain (including clang) to compile. All toolchains fo the llvm toolchain must have the exact same version. Only llvm-15 and llvm-16 are supported (both older and newer version will not work). I would suspect that your clang versions does not match there requirements
clang-cl adds a lot more complex configuration than that. I don't really want to reimplement that here (especially since I am not sure to what degree clang offer stability here, I would rather just take the happy path).
If you have trouble building from source on your distro simply use the docker image (or download the nightly CI builds)
It is somehow strange. I only tested it with LLVM/Clang 15 and 16, but I think I have not yet found the real reason for this compile error. Sometimes it works, sometimes not.
But anyways, it makes sense to keep clang-cl as you said, and I expect it to happen because of a wrong symlink (to a underlying clang call that uses the wrong executeable etc.) or something like that. I will keep you posted on the progress here.
Hey,
I get errors while compiling the ucrt.c file that is seemingly required for Windows. It is compiled using the clang-cl driver, which kind of only exists to mimic the MSVC cl compiler interface. With Ubuntu 22.04 on x86_64 I simply can't compile it using this driver, as it always errors out with "no input files". I also tried newer Ubuntu versions, where it also fails to compile on ARM.
The compile-command is defined on build.rs Line 39 As it uses the "non-cl-conformant" /clang parameters anyways, I would suggest to change it to directly using clang, which never produced an error for me, which I could get to work with the following command-line:
clang -c -fno-autolink -fno-stack-protector --target={target}-pc-windows-msvc -o{ucrt_obj} {ucrt_src}
It should be noted, that I haven't tested the produced windows binary, but the compilation finished without errors on x86_64 and aarch64. The given parameters should be the replacements for the cl-parameters.