diff options
author | Jiri Olsa <jolsa@kernel.org> | 2019-07-21 07:24:12 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-29 17:34:44 -0400 |
commit | a429dcb8feb60b8500fed81e2275c1944e3091fc (patch) | |
tree | 480a44fabf1d8c9491576896917e45cb466b7057 | |
parent | 47f9bccc79cb067103ad5e9790e0d01c94839429 (diff) |
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>
-rw-r--r-- | tools/perf/Makefile.perf | 1 | ||||
-rw-r--r-- | tools/perf/util/setup.py | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 6e7e7d44ffac..67512a12276b 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf | |||
@@ -307,6 +307,7 @@ LIBBPF = $(BPF_PATH)libbpf.a | |||
307 | LIBSUBCMD = $(SUBCMD_PATH)libsubcmd.a | 307 | LIBSUBCMD = $(SUBCMD_PATH)libsubcmd.a |
308 | 308 | ||
309 | LIBPERF = $(LIBPERF_PATH)libperf.a | 309 | LIBPERF = $(LIBPERF_PATH)libperf.a |
310 | export LIBPERF | ||
310 | 311 | ||
311 | # python extension build directories | 312 | # python extension build directories |
312 | PYTHON_EXTBUILD := $(OUTPUT)python_ext_build/ | 313 | PYTHON_EXTBUILD := $(OUTPUT)python_ext_build/ |
diff --git a/tools/perf/util/setup.py b/tools/perf/util/setup.py index a1a68a2fa917..d48f9cd58964 100644 --- a/tools/perf/util/setup.py +++ b/tools/perf/util/setup.py | |||
@@ -48,6 +48,7 @@ build_lib = getenv('PYTHON_EXTBUILD_LIB') | |||
48 | build_tmp = getenv('PYTHON_EXTBUILD_TMP') | 48 | build_tmp = getenv('PYTHON_EXTBUILD_TMP') |
49 | libtraceevent = getenv('LIBTRACEEVENT') | 49 | libtraceevent = getenv('LIBTRACEEVENT') |
50 | libapikfs = getenv('LIBAPI') | 50 | libapikfs = getenv('LIBAPI') |
51 | libperf = getenv('LIBPERF') | ||
51 | 52 | ||
52 | ext_sources = [f.strip() for f in open('util/python-ext-sources') | 53 | ext_sources = [f.strip() for f in open('util/python-ext-sources') |
53 | if len(f.strip()) > 0 and f[0] != '#'] | 54 | if len(f.strip()) > 0 and f[0] != '#'] |
@@ -64,7 +65,7 @@ perf = Extension('perf', | |||
64 | include_dirs = ['util/include'], | 65 | include_dirs = ['util/include'], |
65 | libraries = extra_libraries, | 66 | libraries = extra_libraries, |
66 | extra_compile_args = cflags, | 67 | extra_compile_args = cflags, |
67 | extra_objects = [libtraceevent, libapikfs], | 68 | extra_objects = [libtraceevent, libapikfs, libperf], |
68 | ) | 69 | ) |
69 | 70 | ||
70 | setup(name='perf', | 71 | setup(name='perf', |