mamba-org / mamba

The Fast Cross-Platform Package Manager
https://mamba.readthedocs.io
BSD 3-Clause "New" or "Revised" License
6.79k stars 348 forks source link

build: Use Position-Independent Code #3330

Closed jjerphan closed 3 months ago

jjerphan commented 3 months ago

I needed it to compile libmamba's test suite on my workflow.

Naive: question are there reasons for not using PIC at the moment?

JohanMabille commented 3 months ago

Building shared libraries with CMake automatically turns on the fPIC flag. The only usecase where you wold need this flag is when you mix static and dynamic linked libraries, which is not what we are doing in mamba, so I don't think this is needed.

If this is really needed, it should be done per target, and the reason should be documented.