Updating llvm-project swift/main branch

We will be performing an update to the swift/main branch for apple/llvm-project repository.

We will be verifying the update on Swift CI with following platforms.

  • macOS
  • Ubuntu 16.04, 18.04, 20.04
  • CentOS 7, 8
  • Amazon Linux 2

For those supporting other platforms if you would like to test against the swift/main merge before it lands please check out the following branches:

swift
rebranch

llvm-project

LLDB: swift/rebranch
All other LLVM projects: apple/stable/20210107

Update Checkout Scheme:
./utils/update-checkout --scheme rebranch

Automergers

Swift will have an automerger from main into rebranch to keep the branch in sync.
LLVM Project will have an automerger from apple/stable/20210107 into swift/rebranch .
LLVM Project will not have automerger from swift/main into swift/rebranch, similar to how there’s no automerger from swift/main into swift/next.

Branch Detail

Swift rebranch was created from next on Jan 7th 2021.
LLVM Project swift/rebranch and apple/stable/20210107 were created from swift/next and apple/main on Jan 7th 2021.

I will update this topic before we perform the operation.

5 Likes

Hi @mishal_shah,

I have a few feedback points about the rebranch.

First and foremost, I hoped that the next rebranch would fix the apple/main branch of llvm-project but that doesn't seem to be happening. Other than myself, it seems like nobody is testing building Swift's next branch against apple/main as opposed to the recommended/supported swift/next. This is of course, understandable. That being said, building/testing Swift without the REPL used to work until early December and it arguably should still work. Do you mind if I cherry-pick the two(?) LLVM fixes that should be on the apple/main branch from swift/next?

Also, the rebranch of clang has one test that is failing on my Fedora 33 box:

FAIL: Clang :: CodeGenObjC/availability-check.m (5609 of 27365)
******************** TEST 'Clang :: CodeGenObjC/availability-check.m' FAILED ********************
Script:
--
: 'RUN: at line 1';   /home/dave/b/n/t/bin/clang -cc1 -internal-isystem /home/dave/b/n/t/lib/clang/12.0.0/include -nostdsysteminc -triple x86_64-apple-macosx10.11 -emit-llvm -o - /home/dave/ro_s/n/llvm-project/clang/test/CodeGenObjC/availability-check.m | /home/dave/b/n/t/bin/FileCheck /home/dave/ro_s/n/llvm-project/clang/test/CodeGenObjC/availability-check.m
--
Exit Code: 1

Command Output (stderr):
--
/home/dave/ro_s/n/llvm-project/clang/test/CodeGenObjC/availability-check.m:30:12: error: CHECK: expected string not found in input
 // CHECK: call i32 @__isOSVersionAtLeast(i32 10, i32 16, i32 0)
           ^
<stdin>:41:12: note: scanning from here
 br i1 true, label %if.then7, label %if.end8
           ^
<stdin>:47:7: note: possible intended match here
 %6 = call i32 @__isPlatformVersionAtLeast(i32 1, i32 10, i32 16, i32 0) #1
      ^

Input file: <stdin>
Check file: /home/dave/ro_s/n/llvm-project/clang/test/CodeGenObjC/availability-check.m

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            .
            .
            .
           36:
           37: if.then5: ; preds = %if.end4
           38:  br label %if.end6
           39:
           40: if.end6: ; preds = %if.then5, %if.end4
           41:  br i1 true, label %if.then7, label %if.end8
check:30'0                X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
           42:
check:30'0     ~
           43: if.then7: ; preds = %if.end6
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           44:  br label %if.end8
check:30'0     ~~~~~~~~~~~~~~~~~~
           45:
check:30'0     ~
           46: if.end8: ; preds = %if.then7, %if.end6
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           47:  %6 = call i32 @__isPlatformVersionAtLeast(i32 1, i32 10, i32 16, i32 0) #1
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:30'1           ?                                                                     possible intended match
           48:  %7 = icmp ne i32 %6, 0
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~
           49:  br i1 %7, label %if.then9, label %if.end10
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           50:
check:30'0     ~
           51: if.then9: ; preds = %if.end8
check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           52:  br label %if.end10
check:30'0     ~~~~~~~~~~~~~~~~~~~
            .
            .
            .
>>>>>>

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
********************
Failed Tests (1):
  Clang :: CodeGenObjC/availability-check.m

Dave

The content on the apple/main and swift/next should be identical except for the lldb subdirectory. If that's not the case then we should certainly fix that. We have guard rails in place to avoid that, but there's still ways to get into this situation (a bad merge for example). Please feel free to create a PR with those cherrypicks (swift-ci will complain about it, but @mishal_shah can force merge).

Rebranch CI views:
Swift CI: Swift rebranch [Jenkins]
Swift Community-Hosted CI: https://ci-external.swift.org/view/Swift%20rebranch/

The problem seems to be that commits are landing first on the "stable" branch and then are cherry-picked into the rebranch but never landing on apple/main. This breaks the ability for Swift's next branch to build.

Looks good on Fedora 33 and Rawhide!

2 Likes

Hi @Ron_Olson,

Did you run the test suite from the llvm-project rebranch? It seems to be having the same clang issue I reported above when running the test suite for the apple/main branch.

Dave

I checked both Android architectures in CI (armv7 and aarch64) and both of them build and test with the current branches in the setup used by the CI machines. Good to go from the Android side.

1 Like

Planning on updating the branch today:

Pull Requests:
Swift - https://github.com/apple/swift/pull/35663
llvm-project - https://github.com/apple/llvm-project/pull/2397

swift: main and llvm-project: swift/main branches updated, Thank you!

2 Likes