summaryrefslogtreecommitdiffstats
path: root/Misc/python-config.in
diff options
context:
space:
mode:
authorxdegaye <xdegaye@gmail.com>2019-04-29 07:27:40 (GMT)
committerVictor Stinner <vstinner@redhat.com>2019-04-29 07:27:40 (GMT)
commit254b309c801f82509597e3d7d4be56885ef94c11 (patch)
treeae96f759a67bfb4aaea873da5a488fb1e4e80ab6 /Misc/python-config.in
parentb021ba50284cdfc200b5d18dc4dea80218fcbe91 (diff)
downloadcpython-254b309c801f82509597e3d7d4be56885ef94c11.zip
cpython-254b309c801f82509597e3d7d4be56885ef94c11.tar.gz
cpython-254b309c801f82509597e3d7d4be56885ef94c11.tar.bz2
bpo-21536: On Android, C extensions are linked to libpython (GH-12989)
Diffstat (limited to 'Misc/python-config.in')
-rw-r--r--Misc/python-config.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/Misc/python-config.in b/Misc/python-config.in
index 31ad558..1df30d2 100644
--- a/Misc/python-config.in
+++ b/Misc/python-config.in
@@ -47,7 +47,10 @@ for opt in opt_flags:
print(' '.join(flags))
elif opt in ('--libs', '--ldflags'):
- libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
+ libpython = getvar('LIBPYTHON')
+ libs = [libpython] if libpython else []
+ libs.extend(getvar('LIBS').split() + getvar('SYSLIBS').split())
+
# add the prefix/lib/pythonX.Y/config dir, but only if there is no
# shared library in prefix/lib/.
if opt == '--ldflags':