[feature] Conan 2.0 - Add configuration policy to control fPIC
+ shared
behavior
#7530
Closed
1 task done
Milestone
Currently, the following codeblock exists. It is active by default in Conan V2 mode. It performs nice validation logic for the common case of Linux shared libraries. However, that validation logic is not desirable in all cases, for example, @SSE4 has stated that Android Kernel modules must be compiled with
-shared
but without-fPIC
. Also, the same is true for many embedded and legacy platforms.So First, if we choose to keep this validation logic in the codebase, users should have a way to opt out of it. I suggest a configuration item.
Second, assuming we add a configuration item for this behavior, I suggest the default be "enabled". I would prefer it to be opt-in, but I can understand why making it opt-out is more practical as a default.
Third, I don't understand the error message. The function seems to indicate that it's an error that the
fPIC
option is even defined on the package. To me, it seems that it should indicate that the problem is thatfPIC
option has a value ofFalse
. Perhaps it's just my personal interpretation of the message that is wrong, but I thought I would raise the question.https://github.com/conan-io/conan/blob/develop/conans/client/conanfile/configure.py#L48
The text was updated successfully, but these errors were encountered: