-
Notifications
You must be signed in to change notification settings - Fork 4
Updating to a new version of LLVM and Clang
Matthew Heinsen Egan edited this page Apr 16, 2018
·
8 revisions
This document should outline the process for developers to update SeeC to work with a new release of LLVM and Clang. Users do not need to worry about this.
Simplistically there are two things that we need to do: patch the new Clang release with the changes for SeeC-Clang, and then update SeeC's source code to work correctly (if any changes in LLVM and Clang affect SeeC's code - usually these are fairly minor). However, there is a little more work involved to ensure that the Travis CI builds work correctly.
- On repository
seec-team/llvm-with-seec-clang
, pull from LLVM's git (http://llvm.org/git/llvm.git
) - Checkout the new release e.g.
git checkout release_NN
- Create a new branch that will build and deploy binaries from Travis CI, e.g.
git checkout -b release_NN_travis
- Add the
.travis.yml
file (it will be in the previous release's branchrelease_PP_travis
).
The_travis
branch commits can be cherry-picked in using[first commit hash]^..[final commit hash]
- Update versions in
.travis.yml
(e.g. change deploy branch torelease_NN_travis
). Similarly for Appveyor's configuration files. -
Draft a new release for the branch
release_NN_travis
. Check this release for an example. Travis CI should build from the release tag and attach results for each platform to the release. - Repeat steps 2-5 for Appveyor, where the branch is
release_PP_appveyor
.
- Create a patch series between the current SeeC-Clang release and the commit that it was based on, e.g.
git format-patch -o /directory/for/patches release_OO..sc_release_OO
- Checkout the branch for the new Clang release, e.g.
git checkout release_NN
- From this branch, create a new branch for the new SeeC-Clang release, e.g.
git checkout -b sc_release_NN
- Attempt to apply the patch series, e.g.
git am --3 /directory/for/patches/*
. Correct any conflicts as they arise. - Attempt to build and install your new SeeC-Clang.
- Make seec work with your newly-built LLVM and Seec-Clang. The following files should be updated from the Clang files that they are based on (listed in each file's opening comments):
seec/tools/seec-cc/main.cpp
seec/tools/seec-cc/cc1_main.cpp
seec/tools/seec-cc/SeeCExecuteCompilerInvocation.cpp
- Bump SeeC's trace format version number.
- Make sure that the LLVM release has built and deployed correctly before pushing anything to
seec-team
, because Travis CI will use the results when buildingseec-clang
. - Update
seec-clang
's.travis.yml
so that the value ofSEEC_LLVM_RELEASE_TAG
matches that tag on the new LLVM release (created in (1).6). - Push the changes to
seec-team
and ensure that all Travis CI builds pass. -
Draft a new release for the branch
sc_release_NN
. Check this release for an example. Travis CI should build from the release tag and attach results for each platform to the release.
- Clear Travis CI's cache for seec builds.
- Update
seec
's.travis.yml
file so that the value ofSEEC_LLVM_RELEASE_TAG
matches that tag on the new LLVM release (created in (1).6), and the value ofSEEC_CLANG_RELEASE_TAG
matches that tag on the new SeeC-Clang release (created in (4).4).
- Update
llvm-with-seec-clang
's default branch here. - Update
seec-clang
's default branch here. - Update the build instructions.
- Appveyor cache can be cleared using a JavaScript console on the Appveyor site:
$.ajax({ url: 'https://ci.appveyor.com/api/projects/<username>/<project>/buildcache', type: 'DELETE'});