-
Notifications
You must be signed in to change notification settings - Fork 31
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
Update LLVM/Clang to LLVM 16 #185
Comments
I have compared llvmorg-9.0.0 tag from LLVM repo with main cdt-llvm repo and found these differences: --- a/llvm/utils/release/build_llvm_package.bat set revision=%1 --- a/llvm/utils/lit/lit/init.py author = 'Daniel Dunbar' all = [] --- a/llvm/utils/gn/secondary/llvm/version.gni Was it a try to switch to the next version? |
cdt-llvm repository main branch is an LLVM repository tag llvmorg-9.0.0 with changes from our team so I don't understand why not just merge llvmorg-16.0.0 into cdt-llvm main and then move cdt-llvm repo to cdt repo as a directory if it should be there. |
We agreed with @larryk85 a procedure of the update in the Telegram: @larryk85 ----------------------------------------------------------------------------------------------------- Yes that is the ask, to do away with the separated forked repos and just merge our changes onto the monorepo of LLVM some that we then just have one repo. Also instead of forking the llvm repo and adding it as a submodule. What I would like to see is just adding the merged LLVM code directly to cdt. I.e. hoist and rebase into a new folder that we will just call llvm and do away with the cdt-llvm stuff. That way we would be able to work on those parts and only have one PR. We would also be able to apply upstream changes to llvm-project directly to cdt. @jolly-fellow ----------------------------------------------------------------------------------------------------- @larryk85 ----------------------------------------------------------------------------------------------------- So if you do it and find out that it is only building llvm and not clang and lld. Then Google cmake for LLVM building and you'll see a section on the CMake variables to toggle on which subprojects to build. @jolly-fellow ----------------------------------------------------------------------------------------------------- git easily merge corresponding directories from lvm-project into our repositories, as I understand because these directories are roots of the corresponding repos. So only LLVM code will be merged from lvm-project into cdt-llvm repo, cmake code will be merged into cmake and lld to our lld. |
llvm_9-llvm_cdt.patch.gz cdt-llvm repo was forked from branch release_90 of https://github.com/llvm-mirror/llvm.git repo Now I need to do the same for clang and lld repos, and then update cmake files for integration of building of LLVM monorepo into CDT building process. |
Patch with difference between current state of https://github.com/AntelopeIO/cdt-clang repo and https://github.com/llvm-mirror/clang/tree/release_90 |
Need to re-evaluate the approach. Can we move to vanilla LLVM 16 with custom extensions. |
here is my latest investigation results on this:
|
here is latest work on this: https://github.com/AntelopeIO/cdt/tree/new_llvm
|
Resolved Added absolute paths for external tools in Trying to recreate this build. Running into cmake issues |
Running into issues with
|
Resolved by using LLVM source from llvmorg repo , and not using CDT updates to files. Open a separate issue to investigate what these files provide.
|
Resolved updated code to use new LLVM methods CDT_LLVM.Dec102025.err.txt
|
Resolved Added ClangSupport and LLVMWindows libraries to target Now running into issues Linking CXX executable cc/cdt-cpp |
Resolved added security groups to Now having issues with tests failing , seems to be from bluegrass reflection implementation differences in eosio lib |
Error constructor and member function require static members in |
Note: Removed security_groups that showed up in a previous iteration of the CDT LLVM 16 integration; This code has never been in the main branch. |
Partially resolved changes to Updates
Removed
Original ErrorCode and tools compile, just about every test fails to build: wasm-ld: error: unknown argument: --only-export |
Looking at why apply function is not correctly exported |
Currently, CDT is using LLVM 9 for its internal toolchain. This is a modified version of LLVM, so some care needs to be made during the upgrade process to ensure that all parts that are specific to CDT are carried over and up-ported if needed.
[EDIT]: Question the need to use a modified version of LLVM. Using a vanilla version would be simpler approach. Projects like Blanc have show this approach can be successfully. We lack the experts in compilers and the resourcing to make custom compiler workable. - EP
Since the LLVM project has changed how they 'house' their project on Github, i.e. no longer distinct repositories and now use a mono-repo, this will make things a bit more difficult. The easiest way to move forward I believe is to generate a Git patch from our LLVM code against the mono-repos directories with the mono-repo being checked out as
llvmorg-9.0.0
branch. From there you will be able to apply the patch to the 9.0.0 branch (hopefully no issues exist here), then merge llvmorg-16.0.0 and address any issues.Instead of forking
llvm
the same as we have in the past and creatingcdt-
repos, we will be simply adding it to the project directly.The text was updated successfully, but these errors were encountered: