]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
pybind: use LDFLAGS in env variable when check for building env
authorKefu Chai <tchaikov@gmail.com>
Sun, 24 Mar 2024 12:23:00 +0000 (20:23 +0800)
committerKefu Chai <tchaikov@gmail.com>
Tue, 26 Mar 2024 23:35:28 +0000 (07:35 +0800)
commitf68248944815acbf5fb08ef66f36da6d5baef824
tree11aaa81a743e728f1fbc57537e245b90ee3ff1ac
parentd22734f6cb0e11dff0d94d212f47867fe06ab0fd
pybind: use LDFLAGS in env variable when check for building env

when building python bindings extensions using Cython, we first perform
sanity checks by building an executable and linking it against the
shared library of the C language binding. if the executable builds,
we consider the sanity test passes.

before this change, we don't add `LDFLAGS` specified in environmental
variable to the ldflags when building the executable. but we need to
link against libasan, so that the symbols used by, for instance,
librados.so, can be found by the executable.

in this change, we always check `LDFLAGS`, and add it to the ldflags
when building the executable for testing, if it's set.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/pybind/cephfs/setup.py
src/pybind/rados/setup.py
src/pybind/rbd/setup.py
src/pybind/rgw/setup.py