workflows: Remove symbol versions from libclang.so in the libclang ABI test
authorTom Stellard <tstellar@redhat.com>
Tue, 2 Aug 2022 09:02:15 +0000 (02:02 -0700)
committerTom Stellard <tstellar@redhat.com>
Wed, 3 Aug 2022 04:15:39 +0000 (21:15 -0700)
Now that the symbol version for libclang.so changes for each release again,
we need to remove the symbol versions from the shared library in order
for the ABI checker to be able to compare with an older version of the
shared library.

.github/workflows/libclang-abi-tests.yml

index 90e816b..1b063f6 100644 (file)
@@ -124,12 +124,10 @@ jobs:
     - 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 }}
-        # Remove symbol versioning from dumps, so we can compare across major
-        # versions.  We don't need to do this for libclang.so since its ABI
-        # is stable across major releases and the symbol versions don't change.
-        if [ -e libclang-cpp.so-${{ matrix.ref }}.abi ]; then
-          sed -i 's/LLVM_[0-9]\+/LLVM_NOVERSION/' libclang-cpp.so-${{ matrix.ref }}.abi
-        fi
+        for lib in ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}; do
+          # Remove symbol versioning from dumps, so we can compare across major versions.
+          sed -i 's/LLVM_${{ matrix.llvm_version_major }}/LLVM_NOVERSION/' $lib-${{ matrix.ref }}.abi
+        done
     - name: Upload ABI file
       uses: actions/upload-artifact@v2
       with: