CBL-Mariner/SPECS/llvm
Christopher Co 7c26a6f94f
Update bcc to 0.24.0 and fix two issues found with bpftrace and bcc (#2200)
* bcc: Update to 0.24.0

Includes 5.15+ kernel support

Signed-off-by: Chris Co <chrco@microsoft.com>

* bpftrace: Disable building bpftrace shared libs

Issues reported installing the bpftrace package.

   # dnf install -y bpftrace
   Last metadata expiration check: 0:29:49 ago on Wed Feb  9 21:21:25 2022.
   Error:
   Problem: conflicting requests
     - nothing provides libast.so()(64bit) needed by bpftrace-0.13.0-1.cm2.x86_64
     - nothing provides libbpftrace.so()(64bit) needed by bpftrace-0.13.0-1.cm2.x86_64
   (try to add '--skip-broken' to skip uninstallable packages)

We were not packaging the shared libraries produced by bpftrace's cmake
build. Ultimately we prefer to statically compile bpftrace and tools
rather than distribute the shared libraries.

So update the cmake build options to disable shared library builds.

Signed-off-by: Chris Co <chrco@microsoft.com>

* clang/llvm: Add support for shared library builds

Issue reported where tools built like bcc or bpftrace that are built
with clang and llvm run into the following error:

   # ./argdist
   : CommandLine Error: Option 'use-dbg-addr' registered more than once!
   LLVM ERROR: inconsistency in registered CommandLine options
   Aborted (core dumped)

Root cause of issue is due to how our clang and llvm are currently being
built. The libLLVM.so and libclang-cpp.so libraries are built in a way
that both are adding the same options to the system. This causes any
tools linking against these shared libraries to fail because the option
is indeed registered more than once.

To fix this, we need to enable both LLVM_LINK_LLVM_DYLIB in our llvm
build and CLANG_LINK_CLANG_DYLIB in our clang build.

Signed-off-by: Chris Co <chrco@microsoft.com>
2022-02-23 12:49:50 -08:00
..
llvm.signatures.json [dev] Update clang/llvm to latest 12.0.1 release and update downstream packages as necessary (#1428) 2021-09-29 10:15:26 -07:00
llvm.spec Update bcc to 0.24.0 and fix two issues found with bpftrace and bcc (#2200) 2022-02-23 12:49:50 -08:00