[Distutils] custom setup.py link arguments order
Gabriel Ganne
Gabriel.Ganne at enea.com
Wed Mar 8 03:43:36 EST 2017
Hi,
I'm currently writing a python C module which has a chained dependency:
- mymodule requires libb
- libb requires liba
To that effect, within setup.py, I link against both liba and libb
libraries=['a', 'b'],
Also, as I'm working on Ubuntu, I want to add -Wl,--no-as-needed to make sure that the symbols not immediately needed will still be stripped.
extra_link_args=['-Wl,--no-as-needed'],
However, it seems that the extra_link_args are systematically appended at the end of the link line, but for this to work, the '-Wl,--no-as-needed' argument need to be *before* the link against my two libraries.
How can I choose the order of my link arguments that I pass to gcc using setup.py ?
Best regards,
--
Gabriel Ganne
--
Gabriel Ganne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20170308/8cfa10ed/attachment.html>
More information about the Distutils-SIG
mailing list