Skip to content
Snippets Groups Projects
Commit b547ead5 authored by Byron Johnson's avatar Byron Johnson
Browse files

Fix project-local build flags being ignored.

I noticed that running ‘cabal install’ with two separate sets of dynamic /
static build flags (e.g. one with none, and one with ‘--enable-shared
--enable-executable-dynamic --disable-library-vanilla’) produced packages with
the same hash, instead of different hashes.

After debugging this issue I found that this command (with no explicit cabal
project file) was resulting in these build configuration flags being ignored,
because in ProjectPlanning.hs, the sdist was not considered a local package, so
the (non-shared) local-package-only configuration was being dropped.

This fix ensures that these command-line arguments properly make it through to
where they belong in cases like this.

Additionally, adjust the ‘style’ attribute in plan.json so that globally
installed packages are designated as global even if they are local to the
project.  (Without this adjustment to ‘style2str’, the T5782Diamond test fails,
because it looks up ‘dist-dirs’ in plan.json, where ‘dist-dirs’ is absent from
the JSON.)

Finally, take into account elabDynExe and configDynExe to provide GHC with
‘-dynamic’ appropriately rather than going about it with static linking.
parent df6c22bd
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment