Skip to content
Snippets Groups Projects
Commit d0c2f3a2 authored by Artem Pyanykh's avatar Artem Pyanykh Committed by Marge Bot
Browse files

[hadrian] Rebuild programs on dynamicGhcPrograms/ghcProfiled change

Currently, if you change these ^ flavour parameters, rebuilding is not
triggered, since `programContext` doesn't set up a dependency on
those values.

Exposing these values via an oracle does set the dependency and
properly triggers a rebuild of binaries.

Several attempts to factor out these actions ended up in cyclic
dependency here or there. I'm not absolutely happy with this variant
either, but at least it works.

====

Issue repro:

In UserSettings.hs:
```
dbgDynamic = defaultFlavour { name = "dbg-dynamic"
                            , dynamicGhcPrograms = pure True,
                            ... }

dbgStatic = defaultFlavour { name = "dbg-static"
                           , dynamicGhcPrograms = pure False
                           ... }
```

Then in console:

```
$ hadrian/build.sh -j --flavour=dbg-dynamic
... does the build
$ hadrian/build.sh -j --flavour=dbg-static
... does nothing, considers binaries up to date
```
parent 27789294
No related branches found
No related tags found
No related merge requests found
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