Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler ABI hash should include the toolchain #10811

Open
mpickering opened this issue Mar 3, 2025 · 0 comments
Open

Compiler ABI hash should include the toolchain #10811

mpickering opened this issue Mar 3, 2025 · 0 comments

Comments

@mpickering
Copy link
Collaborator

mpickering commented Mar 3, 2025

Currently cabal-install will create one store directory per distinct compiler. However this is not quite correct since it only consults the "Project Unit Id" field, which records a hash of the build configuration which produced the compiler, but doesn't include toolchain information.

For example, if you install the same compiler twice with two different toolchains then cabal-install will reuse the same store directory, however, this is very likely to not work correctly. For instance, you can't typically use clang to link together object files produced by gcc or vice-versa.

Therefore it would be better to include more information in the hash. The settings file seems appropriate, as that contains (1) The Project Unit Id, which records information about the build, and also (2) any information about the configured toolchain that is discovered during installation.

Related to #10170

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant