Closed AmeyaVS closed 3 years ago
Nitpick: shouldn't it be called “LLVM 11 support”? The incompatibilities are about changes in the LLVM infrastructure, rather than Clang specifically, right?
This doesn't seem to work for LLVM 10, or at least the system version of it provided by Ubuntu 20.04. Is that intentional? I don't have any particular stance, personally, on whether to support more than one version of LLVM, but it seemed worth testing.
$ make -j16 llvm-cbe
Scanning dependencies of target LLVMCBackendCodeGen
[ 25%] Built target LLVMCBackendInfo
[ 37%] Building CXX object lib/Target/CBackend/CMakeFiles/LLVMCBackendCodeGen.dir/CBackend.cpp.o
[ 50%] Building CXX object lib/Target/CBackend/CMakeFiles/LLVMCBackendCodeGen.dir/CTargetMachine.cpp.o
[ 62%] Linking CXX static library libLLVMCBackendCodeGen.a
[ 75%] Built target LLVMCBackendCodeGen
Scanning dependencies of target llvm-cbe
[ 87%] Building CXX object tools/llvm-cbe/CMakeFiles/llvm-cbe.dir/llvm-cbe.cpp.o
tools/llvm-cbe/llvm-cbe.cpp:57:8:error: ‘codegen’ does not name a type
57 | static codegen::RegisterCodeGenFlags CGF;
| ^~~~~~~
tools/llvm-cbe/llvm-cbe.cpp: In function ‘llvm::ToolOutputFile* GetOutputStream(const char*, llvm::Triple::OSType, const char*)’:
tools/llvm-cbe/llvm-cbe.cpp:118:15: error: ‘codegen’ has not been declared
118 | switch (codegen::getFileType()) {
| ^~~~~~~
tools/llvm-cbe/llvm-cbe.cpp:158:11: error: ‘codegen’ has not been declared
158 | switch (codegen::getFileType()) {
| ^~~~~~~
tools/llvm-cbe/llvm-cbe.cpp: In function ‘int compileModule(char**, llvm::LLVMContext&)’:
tools/llvm-cbe/llvm-cbe.cpp:246:17: error: ‘codegen’ has not been declared
246 | auto MAttrs = codegen::getMAttrs();
| ^~~~~~~
tools/llvm-cbe/llvm-cbe.cpp:248:7 error: ‘codegen’ has not been declared
248 | codegen::getMCPU() == "help" || (!MAttrs.empty() && MAttrs.front() == "help");
| ^~~~~~~
tools/llvm-cbe/llvm-cbe.cpp:314:29: error: ‘codegen’ has not been declared
314 | Options.AllowFPOpFusion = codegen::getFuseFPOps();
| ^~~~~~~
tools/llvm-cbe/llvm-cbe.cpp:315:26: error: ‘codegen’ has not been declared
315 | Options.UnsafeFPMath = codegen::getEnableUnsafeFPMath();
| ^~~~~~~
tools/llvm-cbe/llvm-cbe.cpp:316:26: error: ‘codegen’ has not been declared
316 | Options.NoInfsFPMath = codegen::getEnableNoInfsFPMath();
| ^~~~~~~
tools/llvm-cbe/llvm-cbe.cpp:317:26: error: ‘codegen’ has not been declared
317 | Options.NoNaNsFPMath = codegen::getEnableNoNaNsFPMath();
| ^~~~~~~
tools/llvm-cbe/llvm-cbe.cpp:319:7 error: ‘codegen’ has not been declared
319 | codegen::getEnableHonorSignDependentRoundingFPMath();
| ^~~~~~~
tools/llvm-cbe/llvm-cbe.cpp:320:7 error: ‘codegen’ has not been declared
320 | if (codegen::getFloatABIForCalls() != FloatABI::Default)
| ^~~~~~~
tools/llvm-cbe/llvm-cbe.cpp:321:28: error: ‘codegen’ has not been declared
321 | Options.FloatABIType = codegen::getFloatABIForCalls();
| ^~~~~~~
tools/llvm-cbe/llvm-cbe.cpp:322:26: error: ‘codegen’ has not been declared
322 | Options.NoZerosInBSS = codegen::getDontPlaceZerosInBSS();
| ^~~~~~~
tools/llvm-cbe/llvm-cbe.cpp:323:35: error: ‘codegen’ has not been declared
323 | Options.GuaranteedTailCallOpt = codegen::getEnableGuaranteedTailCallOpt();
| ^~~~~~~
tools/llvm-cbe/llvm-cbe.cpp:324:36: error: ‘codegen’ has not been declared
324 | Options.StackAlignmentOverride = codegen::getOverrideStackAlignment();
| ^~~~~~~
tools/llvm-cbe/llvm-cbe.cpp:329:30: error: ‘codegen’ has not been declared
329 | TheTriple.getTriple(), codegen::getMCPU(), FeaturesStr, Options, llvm::codegen::getRelocModel()));
| ^~~~~~~
tools/llvm-cbe/llvm-cbe.cpp:329:78: error: ‘llvm::codegen’ has not been declared
329 | getTriple(), codegen::getMCPU(), FeaturesStr, Options, llvm::codegen::getRelocModel()));
| ^~~~~~~
tools/llvm-cbe/llvm-cbe.cpp:378:34: error: ‘codegen’ has not been declared
378 | codegen::getFileType(), NoVerify)) {
| ^~~~~~~
make[3]: *** [tools/llvm-cbe/CMakeFiles/llvm-cbe.dir/build.make:63: tools/llvm-cbe/CMakeFiles/llvm-cbe.dir/llvm-cbe.cpp.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:406: tools/llvm-cbe/CMakeFiles/llvm-cbe.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:413: tools/llvm-cbe/CMakeFiles/llvm-cbe.dir/rule] Error 2
make: *** [Makefile:255: llvm-cbe] Error 2
@hikari-no-yume Updated the title my bad for missing the intent.
Nitpick: shouldn't it be called “LLVM 11 support”? The incompatibilities are about changes in the LLVM infrastructure, rather than Clang specifically, right?
I will try and fix these code section to be compatible with LLVM-10.
Hi, it builds on my system LLVM 10 now, and running pytest
I only get those same two known failures. Thanks!
Maybe the README should be updated to say it builds with LLVM 11?