[llvm-branch-commits] [llvm] 4Abi debug 20 (PR #133266)

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Mar 27 12:12:20 PDT 2025


https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/133266

>From b2b05ff2f84cb7963093752b9e0d3fe93a6cd021 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Thu, 27 Mar 2025 08:11:08 -0700
Subject: [PATCH 1/7] workflows: Add missing apt-get update to abi tests

---
 .github/workflows/libclang-abi-tests.yml | 5 ++++-
 .github/workflows/llvm-tests.yml         | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/libclang-abi-tests.yml b/.github/workflows/libclang-abi-tests.yml
index 41b3075288d2d..ff8f38b43098e 100644
--- a/.github/workflows/libclang-abi-tests.yml
+++ b/.github/workflows/libclang-abi-tests.yml
@@ -103,6 +103,7 @@ jobs:
         uses: llvm/actions/install-ninja at main
       - name: Install abi-compliance-checker
         run: |
+          sudo apt-get update
           sudo apt-get install abi-dumper autoconf pkg-config
       - name: Install universal-ctags
         run: |
@@ -154,7 +155,9 @@ jobs:
           path: build-latest
 
       - name: Install abi-compliance-checker
-        run: sudo apt-get install abi-compliance-checker
+        run: |
+          sudo apt-get update
+          sudo apt-get install abi-compliance-checker
       - name: Compare ABI
         run: |
           for lib in ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}; do
diff --git a/.github/workflows/llvm-tests.yml b/.github/workflows/llvm-tests.yml
index 9b3d49d4e99b9..92debf2a8a269 100644
--- a/.github/workflows/llvm-tests.yml
+++ b/.github/workflows/llvm-tests.yml
@@ -91,6 +91,7 @@ jobs:
         uses: llvm/actions/install-ninja at main
       - name: Install abi-compliance-checker
         run: |
+          sudo apt-get update
           sudo apt-get install abi-dumper autoconf pkg-config
       - name: Install universal-ctags
         run: |
@@ -163,7 +164,9 @@ jobs:
           path: symbol-list
 
       - name: Install abi-compliance-checker
-        run: sudo apt-get install abi-compliance-checker
+        run: |
+          sudo apt-get update
+          sudo apt-get install abi-compliance-checker
       - name: Compare ABI
         run: |
           if [ -s symbol-list/llvm.symbols ]; then

>From f6c1c53267b35855cfdc450cc88761b2116ae050 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Thu, 27 Mar 2025 08:20:25 -0700
Subject: [PATCH 2/7] [workflows] Use -g instead of -g1 for the abi tests

This should improve the debuginfo and hopefully make the abi tests
more accurate.
---
 .github/workflows/libclang-abi-tests.yml | 2 +-
 .github/workflows/llvm-tests.yml         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/libclang-abi-tests.yml b/.github/workflows/libclang-abi-tests.yml
index ff8f38b43098e..b740e5696350b 100644
--- a/.github/workflows/libclang-abi-tests.yml
+++ b/.github/workflows/libclang-abi-tests.yml
@@ -120,7 +120,7 @@ jobs:
       - name: Configure
         run: |
           mkdir install
-          cmake -B build -S llvm -G Ninja -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="" -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON -DCMAKE_C_FLAGS_DEBUG="-g1 -Og" -DCMAKE_CXX_FLAGS_DEBUG="-g1 -Og" -DCMAKE_INSTALL_PREFIX="$(pwd)"/install llvm
+          cmake -B build -S llvm -G Ninja -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="" -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON -DCMAKE_C_FLAGS_DEBUG="-g -Og" -DCMAKE_CXX_FLAGS_DEBUG="-g -Og" -DCMAKE_INSTALL_PREFIX="$(pwd)"/install llvm
       - name: Build
         run: ninja -C build/ ${{ needs.abi-dump-setup.outputs.ABI_LIBS }} install-clang-headers
       - name: Dump ABI
diff --git a/.github/workflows/llvm-tests.yml b/.github/workflows/llvm-tests.yml
index 92debf2a8a269..43cdccedfc894 100644
--- a/.github/workflows/llvm-tests.yml
+++ b/.github/workflows/llvm-tests.yml
@@ -108,7 +108,7 @@ jobs:
       - name: Configure
         run: |
           mkdir install
-          cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="" -DLLVM_BUILD_LLVM_DYLIB=ON -DCMAKE_C_FLAGS_DEBUG="-g1 -Og" -DCMAKE_CXX_FLAGS_DEBUG="-g1 -Og" -DCMAKE_INSTALL_PREFIX="$(pwd)"/install llvm
+          cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="" -DLLVM_BUILD_LLVM_DYLIB=ON -DCMAKE_C_FLAGS_DEBUG="-g -Og" -DCMAKE_CXX_FLAGS_DEBUG="-g -Og" -DCMAKE_INSTALL_PREFIX="$(pwd)"/install llvm
       - name: Build
         # Need to run install-LLVM twice to ensure the symlink is installed (this is a bug).
         run: |

>From 12036ba96b6efc54973d895cd1db5ee6143e2804 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Thu, 27 Mar 2025 08:25:56 -0700
Subject: [PATCH 3/7] [workfows] Run abi checks in the ci container

This has a faster compiler and should help reduce build times.
---
 .github/workflows/libclang-abi-tests.yml | 2 ++
 .github/workflows/llvm-tests.yml         | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/.github/workflows/libclang-abi-tests.yml b/.github/workflows/libclang-abi-tests.yml
index b740e5696350b..9c447250bfbdd 100644
--- a/.github/workflows/libclang-abi-tests.yml
+++ b/.github/workflows/libclang-abi-tests.yml
@@ -83,6 +83,8 @@ jobs:
   abi-dump:
     if: github.repository_owner == 'llvm'
     needs: abi-dump-setup
+    container:
+      image: 'ghcr.io/llvm/ci-ubuntu-22.04:latest'
     runs-on: ubuntu-latest
     strategy:
       matrix:
diff --git a/.github/workflows/llvm-tests.yml b/.github/workflows/llvm-tests.yml
index 43cdccedfc894..40347071cdbc9 100644
--- a/.github/workflows/llvm-tests.yml
+++ b/.github/workflows/llvm-tests.yml
@@ -72,6 +72,8 @@ jobs:
     if: github.repository_owner == 'llvm'
     needs: abi-dump-setup
     runs-on: ubuntu-latest
+    container:
+      image: 'ghcr.io/llvm/ci-ubuntu-22.04:latest'
     strategy:
       matrix:
         name:

>From 6c60d6b05be470dc5a5842ceb3e1541e03f6e9de Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Thu, 27 Mar 2025 08:58:48 -0700
Subject: [PATCH 4/7] [workflows] Add missing -y option to apt-get for abi
 tests

---
 .github/workflows/libclang-abi-tests.yml | 4 ++--
 .github/workflows/llvm-tests.yml         | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/libclang-abi-tests.yml b/.github/workflows/libclang-abi-tests.yml
index 9c447250bfbdd..38fdf3a206dea 100644
--- a/.github/workflows/libclang-abi-tests.yml
+++ b/.github/workflows/libclang-abi-tests.yml
@@ -106,7 +106,7 @@ jobs:
       - name: Install abi-compliance-checker
         run: |
           sudo apt-get update
-          sudo apt-get install abi-dumper autoconf pkg-config
+          sudo apt-get install -y abi-dumper autoconf pkg-config
       - name: Install universal-ctags
         run: |
           git clone https://github.com/universal-ctags/ctags.git
@@ -159,7 +159,7 @@ jobs:
       - name: Install abi-compliance-checker
         run: |
           sudo apt-get update
-          sudo apt-get install abi-compliance-checker
+          sudo apt-get install -y abi-compliance-checker
       - name: Compare ABI
         run: |
           for lib in ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}; do
diff --git a/.github/workflows/llvm-tests.yml b/.github/workflows/llvm-tests.yml
index 40347071cdbc9..555323fa975d4 100644
--- a/.github/workflows/llvm-tests.yml
+++ b/.github/workflows/llvm-tests.yml
@@ -94,7 +94,7 @@ jobs:
       - name: Install abi-compliance-checker
         run: |
           sudo apt-get update
-          sudo apt-get install abi-dumper autoconf pkg-config
+          sudo apt-get -y install abi-dumper autoconf pkg-config
       - name: Install universal-ctags
         run: |
           git clone https://github.com/universal-ctags/ctags.git
@@ -168,7 +168,7 @@ jobs:
       - name: Install abi-compliance-checker
         run: |
           sudo apt-get update
-          sudo apt-get install abi-compliance-checker
+          sudo apt-get -y install abi-compliance-checker
       - name: Compare ABI
         run: |
           if [ -s symbol-list/llvm.symbols ]; then

>From 0e2b8e4820d24beb47f628e259306f8daecd55d4 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Thu, 27 Mar 2025 09:05:04 -0700
Subject: [PATCH 5/7] Build with clang

---
 .github/workflows/libclang-abi-tests.yml | 2 +-
 .github/workflows/llvm-tests.yml         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/libclang-abi-tests.yml b/.github/workflows/libclang-abi-tests.yml
index 38fdf3a206dea..7227120583ffa 100644
--- a/.github/workflows/libclang-abi-tests.yml
+++ b/.github/workflows/libclang-abi-tests.yml
@@ -122,7 +122,7 @@ jobs:
       - name: Configure
         run: |
           mkdir install
-          cmake -B build -S llvm -G Ninja -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="" -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON -DCMAKE_C_FLAGS_DEBUG="-g -Og" -DCMAKE_CXX_FLAGS_DEBUG="-g -Og" -DCMAKE_INSTALL_PREFIX="$(pwd)"/install llvm
+          cmake -B build -S llvm -G Ninja -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="" -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON -DCMAKE_C_FLAGS_DEBUG="-g -Og" -DCMAKE_CXX_FLAGS_DEBUG="-g -Og" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_INSTALL_PREFIX="$(pwd)"/install llvm
       - name: Build
         run: ninja -C build/ ${{ needs.abi-dump-setup.outputs.ABI_LIBS }} install-clang-headers
       - name: Dump ABI
diff --git a/.github/workflows/llvm-tests.yml b/.github/workflows/llvm-tests.yml
index 555323fa975d4..0dfd3ee83f976 100644
--- a/.github/workflows/llvm-tests.yml
+++ b/.github/workflows/llvm-tests.yml
@@ -110,7 +110,7 @@ jobs:
       - name: Configure
         run: |
           mkdir install
-          cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="" -DLLVM_BUILD_LLVM_DYLIB=ON -DCMAKE_C_FLAGS_DEBUG="-g -Og" -DCMAKE_CXX_FLAGS_DEBUG="-g -Og" -DCMAKE_INSTALL_PREFIX="$(pwd)"/install llvm
+          cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="" -DLLVM_BUILD_LLVM_DYLIB=ON -DCMAKE_C_FLAGS_DEBUG="-g -Og" -DCMAKE_CXX_FLAGS_DEBUG="-g -Og" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_INSTALL_PREFIX="$(pwd)"/install llvm
       - name: Build
         # Need to run install-LLVM twice to ensure the symlink is installed (this is a bug).
         run: |

>From d7650c58ada36df6281168f0dc7012d6aa0b9889 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Thu, 27 Mar 2025 11:11:12 -0700
Subject: [PATCH 6/7] Verbose ninja

---
 .github/workflows/llvm-tests.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/llvm-tests.yml b/.github/workflows/llvm-tests.yml
index 0dfd3ee83f976..b13e1cff69435 100644
--- a/.github/workflows/llvm-tests.yml
+++ b/.github/workflows/llvm-tests.yml
@@ -114,9 +114,9 @@ jobs:
       - name: Build
         # Need to run install-LLVM twice to ensure the symlink is installed (this is a bug).
         run: |
-          ninja -C build install-LLVM
-          ninja -C build install-LLVM
-          ninja -C build install-llvm-headers
+          ninja -v -C build install-LLVM
+          ninja -v -C build install-LLVM
+          ninja -v -C build install-llvm-headers
       - name: Dump ABI
         run: |
           if [ "${{ needs.abi-dump-setup.outputs.ABI_HEADERS }}" = "llvm-c" ]; then

>From d1237a3e3d610516697f9e5a547f0d44209c1551 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Thu, 27 Mar 2025 12:11:48 -0700
Subject: [PATCH 7/7] Stop using clang

---
 .github/workflows/libclang-abi-tests.yml | 4 ++--
 .github/workflows/llvm-tests.yml         | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/libclang-abi-tests.yml b/.github/workflows/libclang-abi-tests.yml
index 7227120583ffa..ba9119fca9579 100644
--- a/.github/workflows/libclang-abi-tests.yml
+++ b/.github/workflows/libclang-abi-tests.yml
@@ -122,9 +122,9 @@ jobs:
       - name: Configure
         run: |
           mkdir install
-          cmake -B build -S llvm -G Ninja -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="" -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON -DCMAKE_C_FLAGS_DEBUG="-g -Og" -DCMAKE_CXX_FLAGS_DEBUG="-g -Og" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_INSTALL_PREFIX="$(pwd)"/install llvm
+          cmake -B build -S llvm -G Ninja -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="" -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON -DCMAKE_C_FLAGS_DEBUG="-g -Og" -DCMAKE_CXX_FLAGS_DEBUG="-g -Og" -DCMAKE_INSTALL_PREFIX="$(pwd)"/install llvm
       - name: Build
-        run: ninja -C build/ ${{ needs.abi-dump-setup.outputs.ABI_LIBS }} install-clang-headers
+        run: ninja -v -C build/ ${{ needs.abi-dump-setup.outputs.ABI_LIBS }} install-clang-headers
       - name: Dump ABI
         run: |
           parallel abi-dumper -lver ${{ matrix.ref }} -skip-cxx -public-headers ./install/include/${{ needs.abi-dump-setup.outputs.ABI_HEADERS }} -o {}-${{ matrix.ref }}.abi ./build/lib/{} ::: ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}
diff --git a/.github/workflows/llvm-tests.yml b/.github/workflows/llvm-tests.yml
index b13e1cff69435..f19475edc7129 100644
--- a/.github/workflows/llvm-tests.yml
+++ b/.github/workflows/llvm-tests.yml
@@ -110,7 +110,7 @@ jobs:
       - name: Configure
         run: |
           mkdir install
-          cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="" -DLLVM_BUILD_LLVM_DYLIB=ON -DCMAKE_C_FLAGS_DEBUG="-g -Og" -DCMAKE_CXX_FLAGS_DEBUG="-g -Og" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_INSTALL_PREFIX="$(pwd)"/install llvm
+          cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="" -DLLVM_BUILD_LLVM_DYLIB=ON -DCMAKE_C_FLAGS_DEBUG="-g -Og" -DCMAKE_CXX_FLAGS_DEBUG="-g -Og" -DCMAKE_INSTALL_PREFIX="$(pwd)"/install llvm
       - name: Build
         # Need to run install-LLVM twice to ensure the symlink is installed (this is a bug).
         run: |



More information about the llvm-branch-commits mailing list