Commit a429dcb8 authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo

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: default avatarJiri Olsa <jolsa@kernel.org>
Tested-by: default avatarArnaldo 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.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 47f9bccc
...@@ -307,6 +307,7 @@ LIBBPF = $(BPF_PATH)libbpf.a ...@@ -307,6 +307,7 @@ LIBBPF = $(BPF_PATH)libbpf.a
LIBSUBCMD = $(SUBCMD_PATH)libsubcmd.a LIBSUBCMD = $(SUBCMD_PATH)libsubcmd.a
LIBPERF = $(LIBPERF_PATH)libperf.a LIBPERF = $(LIBPERF_PATH)libperf.a
export LIBPERF
# python extension build directories # python extension build directories
PYTHON_EXTBUILD := $(OUTPUT)python_ext_build/ PYTHON_EXTBUILD := $(OUTPUT)python_ext_build/
......
...@@ -48,6 +48,7 @@ build_lib = getenv('PYTHON_EXTBUILD_LIB') ...@@ -48,6 +48,7 @@ build_lib = getenv('PYTHON_EXTBUILD_LIB')
build_tmp = getenv('PYTHON_EXTBUILD_TMP') build_tmp = getenv('PYTHON_EXTBUILD_TMP')
libtraceevent = getenv('LIBTRACEEVENT') libtraceevent = getenv('LIBTRACEEVENT')
libapikfs = getenv('LIBAPI') libapikfs = getenv('LIBAPI')
libperf = getenv('LIBPERF')
ext_sources = [f.strip() for f in open('util/python-ext-sources') ext_sources = [f.strip() for f in open('util/python-ext-sources')
if len(f.strip()) > 0 and f[0] != '#'] if len(f.strip()) > 0 and f[0] != '#']
...@@ -64,7 +65,7 @@ perf = Extension('perf', ...@@ -64,7 +65,7 @@ perf = Extension('perf',
include_dirs = ['util/include'], include_dirs = ['util/include'],
libraries = extra_libraries, libraries = extra_libraries,
extra_compile_args = cflags, extra_compile_args = cflags,
extra_objects = [libtraceevent, libapikfs], extra_objects = [libtraceevent, libapikfs, libperf],
) )
setup(name='perf', setup(name='perf',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment