Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpha Level LLVM-11 Support #91

Merged
merged 4 commits into from
Apr 21, 2021
Merged

Conversation

AmeyaVS
Copy link
Contributor

@AmeyaVS AmeyaVS commented Mar 4, 2021

  • Not exhaustively tested
  • Some feature might be broken
  • Currently only build and tested out-of-tree LLVM build tree.
  • Current pytest report:
============================================================================================= short test summary info =============================================================================================
FAILED test/test_cbe.py::test_consistent_return_value_c[test_char_sized_ptr_math_decr--O2] - Exception: Got unexpected output from process
FAILED test/test_cbe.py::test_consistent_return_value_c[test_char_sized_ptr_math_decr--O3] - Exception: Got unexpected output from process
============================================================================== 2 failed, 497 passed, 32 xfailed in 72.76s (0:01:12) ===============================================================================

* **Not** exhaustively tested
* Some feature might be broken
* Currently only build and tested out-of-tree LLVM build tree.
@hikari-no-yume
Copy link
Collaborator

Nitpick: shouldn't it be called “LLVM 11 support”? The incompatibilities are about changes in the LLVM infrastructure, rather than Clang specifically, right?

@hikari-no-yume
Copy link
Collaborator

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

@AmeyaVS
Copy link
Contributor Author

AmeyaVS commented Mar 14, 2021

@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.

@AmeyaVS AmeyaVS changed the title Alpha Level Clang-11 Support Alpha Level LLVM-11 Support Mar 14, 2021
@hikari-no-yume
Copy link
Collaborator

Hi, it builds on my system LLVM 10 now, and running pytest I only get those same two known failures. Thanks!

@vtjnash vtjnash merged commit 35ec2f9 into JuliaHubOSS:master Apr 21, 2021
@hikari-no-yume
Copy link
Collaborator

Maybe the README should be updated to say it builds with LLVM 11?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants