All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Thomas Richter <tmricht@linux.ibm.com>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	irogers@google.com, wangnan0@huawei.com, jolsa@kernel.org,
	svens@linux.ibm.com, gor@linux.ibm.com, sumanthk@linux.ibm.com,
	hca@linux.ibm.com
Subject: Re: [PATCH 2/2 Resend] perf build: Support llvm and clang support compiled in
Date: Wed, 2 Aug 2023 11:37:33 -0300	[thread overview]
Message-ID: <ZMpqLaqcQLHLrGNt@kernel.org> (raw)
In-Reply-To: <20230725150347.3479291-2-tmricht@linux.ibm.com>

Em Tue, Jul 25, 2023 at 05:03:47PM +0200, Thomas Richter escreveu:
> 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
>  #

Thanks, tested and applied!

- Arnaldo
 
> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
> Cc: Wang Nan <wangnan0@huawei.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> 
> 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
> 
> Tested-by: Ian Rogers <irogers@google.com>
> ---
>  tools/perf/Makefile.config | 2 +-
>  tools/perf/Makefile.perf   | 5 +----
>  2 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index c5db0de49868..8e1d1fab9b4d 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -325,7 +325,7 @@ CORE_CFLAGS += -Wall
>  CORE_CFLAGS += -Wextra
>  CORE_CFLAGS += -std=gnu11
>  
> -CXXFLAGS += -std=gnu++14 -fno-exceptions -fno-rtti
> +CXXFLAGS += -std=gnu++17 -fno-exceptions -fno-rtti
>  CXXFLAGS += -Wall
>  CXXFLAGS += -fno-omit-frame-pointer
>  CXXFLAGS += -ggdb3
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index 097316ef38e6..158a0733fc9d 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -426,10 +426,7 @@ EXTLIBS := $(call filter-out,$(EXCLUDE_EXTLIBS),$(EXTLIBS))
>  LIBS = -Wl,--whole-archive $(PERFLIBS) $(EXTRA_PERFLIBS) -Wl,--no-whole-archive -Wl,--start-group $(EXTLIBS) -Wl,--end-group
>  
>  ifeq ($(USE_CLANG), 1)
> -  CLANGLIBS_LIST = AST Basic CodeGen Driver Frontend Lex Tooling Edit Sema Analysis Parse Serialization
> -  CLANGLIBS_NOEXT_LIST = $(foreach l,$(CLANGLIBS_LIST),$(shell $(LLVM_CONFIG) --libdir)/libclang$(l))
> -  LIBCLANG = $(foreach l,$(CLANGLIBS_NOEXT_LIST),$(wildcard $(l).a $(l).so))
> -  LIBS += -Wl,--start-group $(LIBCLANG) -Wl,--end-group
> +  LIBS += -L$(shell $(LLVM_CONFIG) --libdir) -lclang-cpp
>  endif
>  
>  ifeq ($(USE_LLVM), 1)
> -- 
> 2.41.0
> 

-- 

- Arnaldo

  reply	other threads:[~2023-08-02 14:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-25 15:03 [PATCH 1/2 Resend] perf build: Update feature check for clang and llvm Thomas Richter
2023-07-25 15:03 ` [PATCH 2/2 Resend] perf build: Support llvm and clang support compiled in Thomas Richter
2023-08-02 14:37   ` Arnaldo Carvalho de Melo [this message]
2023-08-02 14:28 ` [PATCH 1/2 Resend] perf build: Update feature check for clang and llvm Arnaldo Carvalho de Melo
2023-08-10 22:07   ` Ian Rogers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZMpqLaqcQLHLrGNt@kernel.org \
    --to=acme@kernel.org \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sumanthk@linux.ibm.com \
    --cc=svens@linux.ibm.com \
    --cc=tmricht@linux.ibm.com \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.