Skip to content

Commit a429dcb

Browse files
olsajiriacmel
authored andcommitted
libperf: Add libperf to the python.so build
Link libperf.a with python.so. Committer testing: Continues to work: # perf test python 18: 'import perf' in python : Ok # Signed-off-by: Jiri Olsa <jolsa@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexey Budankov <alexey.budankov@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190721112506.12306-26-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 47f9bcc commit a429dcb

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎tools/perf/Makefile.perf‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ LIBBPF = $(BPF_PATH)libbpf.a
307307
LIBSUBCMD = $(SUBCMD_PATH)libsubcmd.a
308308

309309
LIBPERF = $(LIBPERF_PATH)libperf.a
310+
export LIBPERF
310311

311312
# python extension build directories
312313
PYTHON_EXTBUILD := $(OUTPUT)python_ext_build/

‎tools/perf/util/setup.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def finalize_options(self):
4848
build_tmp = getenv('PYTHON_EXTBUILD_TMP')
4949
libtraceevent = getenv('LIBTRACEEVENT')
5050
libapikfs = getenv('LIBAPI')
51+
libperf = getenv('LIBPERF')
5152

5253
ext_sources = [f.strip() for f in open('util/python-ext-sources')
5354
if len(f.strip()) > 0 and f[0] != '#']
@@ -64,7 +65,7 @@ def finalize_options(self):
6465
include_dirs = ['util/include'],
6566
libraries = extra_libraries,
6667
extra_compile_args = cflags,
67-
extra_objects = [libtraceevent, libapikfs],
68+
extra_objects = [libtraceevent, libapikfs, libperf],
6869
)
6970

7071
setup(name='perf',

0 commit comments

Comments
 (0)