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

feat: upgrade host llvm from 18 to 19 #87

Merged
merged 1 commit into from
Nov 13, 2024
Merged

Conversation

antonbaliasnikov
Copy link
Contributor

Upgrade host LLVM from 18 to 19 to correspond to the Rust version used in builds:

rustc 1.82.0 (f6e511eec 2024-10-15)
binary: rustc
commit-hash: f6e511eec7342f59a25f7c0534f1dbea00d01b14
commit-date: 2024-10-15
host: aarch64-apple-darwin
release: 1.82.0
LLVM version: 19.1.1

@antonbaliasnikov
Copy link
Contributor Author

Related to matter-labs/era-compiler-solidity#196

@antonbaliasnikov
Copy link
Contributor Author

Building our fork with LLVM 19 is now fails with an error:

[329/2421] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/ConstantFold.cpp.o
FAILED: lib/IR/CMakeFiles/LLVMCore.dir/ConstantFold.cpp.o
/usr/lib/llvm-19/bin/clang++ -DGTEST_HAS_RTTI=0 -D_ERAVM -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/era-compiler-solidity/target-llvm/build-final/lib/IR -I/era-compiler-solidity/llvm/llvm/lib/IR -I/era-compiler-solidity/target-llvm/build-final/include -I/era-compiler-solidity/llvm/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -std=c++17 -MD -MT lib/IR/CMakeFiles/LLVMCore.dir/ConstantFold.cpp.o -MF lib/IR/CMakeFiles/LLVMCore.dir/ConstantFold.cpp.o.d -o lib/IR/CMakeFiles/LLVMCore.dir/ConstantFold.cpp.o -c /era-compiler-solidity/llvm/llvm/lib/IR/ConstantFold.cpp
/era-compiler-solidity/llvm/llvm/lib/IR/ConstantFold.cpp:117:21: error: variable 'SrcTy' set but not used [-Werror,-Wunused-but-set-variable]
  117 |     if (VectorType *SrcTy = dyn_cast<VectorType>(V->getType())) {
      |                     ^
1 error generated.
[337/2421] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/Core.cpp.o
FAILED: lib/IR/CMakeFiles/LLVMCore.dir/Core.cpp.o
/usr/lib/llvm-19/bin/clang++ -DGTEST_HAS_RTTI=0 -D_ERAVM -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/era-compiler-solidity/target-llvm/build-final/lib/IR -I/era-compiler-solidity/llvm/llvm/lib/IR -I/era-compiler-solidity/target-llvm/build-final/include -I/era-compiler-solidity/llvm/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -std=c++17 -MD -MT lib/IR/CMakeFiles/LLVMCore.dir/Core.cpp.o -MF lib/IR/CMakeFiles/LLVMCore.dir/Core.cpp.o.d -o lib/IR/CMakeFiles/LLVMCore.dir/Core.cpp.o -c /era-compiler-solidity/llvm/llvm/lib/IR/Core.cpp
/era-compiler-solidity/llvm/llvm/lib/IR/Core.cpp:99:22: error: cast from 'LLVMDiagnosticHandler' (aka 'void (*)(LLVMOpaqueDiagnosticInfo *, void *)') to 'DiagnosticHandler::DiagnosticHandlerTy' (aka 'void (*)(const DiagnosticInfo &, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-mismatch]
   99 |       LLVM_EXTENSION reinterpret_cast<DiagnosticHandler::DiagnosticHandlerTy>(
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  100 |           Handler),
      |           ~~~~~~~~
/era-compiler-solidity/llvm/llvm/lib/IR/Core.cpp:105:25: error: cast from 'DiagnosticHandler::DiagnosticHandlerTy' (aka 'void (*)(const DiagnosticInfo &, void *)') to 'LLVMDiagnosticHandler' (aka 'void (*)(LLVMOpaqueDiagnosticInfo *, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-mismatch]
  105 |   return LLVM_EXTENSION reinterpret_cast<LLVMDiagnosticHandler>(
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  106 |       unwrap(C)->getDiagnosticHandlerCallBack());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
[344/2421] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/DebugInfoMetadata.cpp.o

@antonbaliasnikov antonbaliasnikov merged commit e6eb38b into main Nov 13, 2024
2 checks passed
@antonbaliasnikov antonbaliasnikov deleted the upgrade-to-llvm-19 branch November 13, 2024 10:35
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.

2 participants