diff options
author | Ian Rogers <irogers@google.com> | 2023-07-24 13:12:47 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2023-07-24 18:24:25 -0300 |
commit | c126ac4a2003fff398311739514f173944a5ceab (patch) | |
tree | 31c0eaddb1005cafb6693cd605a9328c5ad470b0 | |
parent | 5cfb0cc0d95af8bf33a8fb1cedc3e76ca3b6fb81 (diff) | |
download | linux-stable-c126ac4a2003fff398311739514f173944a5ceab.tar.gz linux-stable-c126ac4a2003fff398311739514f173944a5ceab.tar.bz2 linux-stable-c126ac4a2003fff398311739514f173944a5ceab.zip |
perf build: Add LTO build option
Add an LTO build option, that sets the appropriate CFLAGS and CXXFLAGS
values.
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Carsten Haitzler <carsten.haitzler@arm.com>
Cc: Fangrui Song <maskray@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: Tom Rix <trix@redhat.com>
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
Cc: Yang Jihong <yangjihong1@huawei.com>
Cc: bpf@vger.kernel.org
Cc: llvm@lists.linux.dev
Link: https://lore.kernel.org/r/20230724201247.748146-5-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/Makefile.config | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index c5db0de49868..a9cfe83638a9 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -256,6 +256,11 @@ ifdef PARSER_DEBUG $(call detected_var,PARSER_DEBUG_FLEX) endif +ifdef LTO + CORE_CFLAGS += -flto + CXXFLAGS += -flto +endif + # Try different combinations to accommodate systems that only have # python[2][3]-config in weird combinations in the following order of # priority from lowest to highest: |