Skip to content

Upgrade Checked C clang sources to clang mainline 17.0  #1204

Open
@dtarditi

Description

@dtarditi

In March 2024, we decided that we need to upgrade the Checked C clang sources to a newer version of clang. The Checked C clang source are currently based on clang 12.0.2, from Jan. 2021.

I updated the Wiki page on upgrading the compiler sources to point the most recent documentation on this.

I looked at clang 16.0 from July 2022 and clang 17.0 from Jan. 2023. In both cases, I merged the Checked clang sources into a baseline branch that matches upstream. I then committed the changes with the merge markers and diff'ed the two versions with merge conflicts. It does not look like much more work to jump to clang 17.0 instead of clang 16.0. There were only 95 merge chunks that differed between the two (and these could be because upstream changed relative to itself).

We will aim from clang 17.0. I've pushed two branches: 17-init-baseline, which just mirrors upstream at the point where the branch for 17.0 was a taken and 17-init-main, which has the Checked C clang sources merged into. We always smaller changes (the Checked C changes) into the clang sources (which have much more changes).

If you look at dates, we will be updating to 2 years of changes. This is about 2/3 of the time delta. This seems look a reasonable mid-point to aim for.

I am tracking progress on resolving the merge conflicts with the following files:

The current work is to resolve merge conflicts and get clang to compile again. The approach is to:

  1. Try to build clang
  2. See what files fail to compile.
  3. Fix the merge conflicts or compile files in a few files.
  4. Once those files succeed, check-in the changes and repeat the whole process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions