Don't reuse `hsLibraries` field of InstalledPackageInfo for native libraries
In #22564 (comment 468545) we noted that users of the extra-bundled-libraries
field are saddled with the unfortunate requirement of naming their native libraries with a libC
prefix (specified in the Cabal reference documentation).
The requirement is due to the strange implementation of extra-bundled-libraries
: "bundled" libraries are added to the hsLibraries
field of InstalledPackageInfo
, leaving the runtime linker with an ambiguity regarding whether the library is a Haskell object (in which case it may need a "way" suffix in its name) or native object. The required libHS
/libC
prefix allows the linker to resolve this ambiguity.
IMHO it would be much better if extra-bundled-libraries
were instead implemented in terms of a new InstalledPackageInfo
field, eliminating the ambiguity by construction.