perf build: Support llvm and clang support compiled in
authorThomas Richter <tmricht@linux.ibm.com>
Tue, 25 Jul 2023 15:03:47 +0000 (17:03 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 3 Aug 2023 20:01:28 +0000 (17:01 -0300)
commit8fcaea9fd0dabc33f1a18f62aa3cf3d12286cd9f
tree10bcb9e24feb0e87ca80849ca0ec20d0ad377ffb
parent4e95ed4f4d5bc6838a10e6952999b41b1d07e56f
perf build: Support llvm and clang support compiled in

Perf build suports llvm and clang support compiled in.
Test case 56 builtin clang support provides a test case
which is always skipped.

Link perf with the latest llvm and clang libraries and
enable this test case.

Use 'make LIBCLANGLLVM=1' to include this support.

V2: Add Library patch before -lclang-cpp

Output before:

  # ./perf test 56
  56: builtin clang support                  :
  56.1: builtin clang compile C source to IR : Skip (not compiled in)
  56.2: builtin clang compile C source to ELF object: Skip (not compiled in)

Output after:

  # ./perf test 56
  56: builtin clang support                          :
  56.1: builtin clang compile C source to IR         : Ok
  56.2: builtin clang compile C source to ELF object : Ok
  #

From Ian Rogers:

  Build tested with LLVM 14 and 15 using:
  BUILD_BPF_SKEL=1 LIBCLANGLLVM=1 LLVM_CONFIG=llvm-config-14
  BUILD_BPF_SKEL=1 LIBCLANGLLVM=1 LLVM_CONFIG=llvm-config-15

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Tested-by: Ian Rogers <irogers@google.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lore.kernel.org/r/20230725150347.3479291-2-tmricht@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Makefile.config
tools/perf/Makefile.perf