Description
The fir-opt
tool that is installed unconditionally has some code conditional to FLANG_INCLUDE_TESTS
. This implies that the tool installed as part of a CMake run with tests being built will be different than the tool installed otherwise.
At the very least, this goes against the principle of least surprise, and violates the Gentoo-specific policy that testing must not affect the installed package. Also, this is quite problematic for us since it implies static linking to MLIR (as the relevant test-specific MLIR libraries aren't available in the dylib — which could be acceptable for discardable test executables, but it's not fine for installed executables).
Could we perhaps build two versions of fir-opt
instead? One that would not contain test-specific code and be installed, and another one with test-specific code that's only used by the test suite? I can submit a pull request if you agree with that approach.