summaryrefslogtreecommitdiff
path: root/compiler/iface/FlagChecker.hs
Commit message (Collapse)AuthorAgeFilesLines
* Implement recompilation checking for -fignore-assertsÖmer Sinan Ağacan2017-07-031-1/+5
| | | | | | | | | | | | | | Test Plan: Added a test which was previously failing Reviewers: austin, bgamari, simonpj Reviewed By: simonpj Subscribers: simonpj, rwbarton, thomie GHC Trac Issues: #13914 Differential Revision: https://phabricator.haskell.org/D3698
* Recompile if -fhpc is added or removed (#11798)Reid Barton2017-03-261-2/+8
| | | | | | | | | | | | Test Plan: validate Reviewers: austin, bgamari, dfeuer Reviewed By: dfeuer Subscribers: dfeuer, thomie Differential Revision: https://phabricator.haskell.org/D3368
* Introduce and use EnumSet in DynFlagsBen Gamari2017-03-151-2/+2
| | | | | | | | | | | | | | | This factors out a repeated pattern found in DynFlags, where we use an IntSet and Enum to represent sets of flags. Requires bump of haddock submodule. Test Plan: validate Reviewers: austin, goldfire Subscribers: rwbarton, thomie, snowleopard Differential Revision: https://phabricator.haskell.org/D3331
* Fix a Backpack recompilation avoidance bug when signatures change.Edward Z. Yang2017-02-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Recompilation avoidance checks if -this-unit-id has changed by relying on the "wanted module" check in readIface ("Something is amiss..."). Unfortunately, this check didn't check if the instantiation made sense, which meant that if you changed the signatures of a Backpack package, we'd still treat the old signatures as up-to-date. The way I fixed this was by having findAndReadIface take in a 'Module' representing the /actual/ module we were intending to lookup. We convert this into the 'Module' we expect to see in 'mi_module' and now do a more elaborate check that will also verify that instantiations make sense. Along the way, I robustified the logging infrastructure for recompilation checking, and folded wrongIfaceModErr (which was dead code) into the error message. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: bgamari, austin Subscribers: thomie, snowleopard Differential Revision: https://phabricator.haskell.org/D3130
* Clean up handling of known-key Names in interface filesBen Gamari2016-10-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously BinIface had some dedicated logic for handling tuple names in the symbol table. As it turns out, this logic was essentially dead code as it was superceded by the special handling of known-key things. Here we cull the tuple code-path and use the known-key codepath for all tuple-ish things. This had a surprising number of knock-on effects, * constraint tuple datacons had to be made known-key (previously they were not) * IfaceTopBndr was changed from being a synonym of OccName to a synonym of Name (since we now need to be able to deserialize Names directly from interface files) * the change to IfaceTopBndr complicated fingerprinting, since we need to ensure that we don't go looking for the fingerprint of the thing we are currently fingerprinting in the fingerprint environment (see notes in MkIface). Handling this required distinguishing between binding and non-binding Name occurrences in the Binary serializers. * the original name cache logic which previously lived in IfaceEnv has been moved to a new NameCache module * I ripped tuples and sums out of knownKeyNames since they introduce a very large number of entries. During interface file deserialization we use static functions (defined in the new KnownUniques module) to map from a Unique to a known-key Name (the Unique better correspond to a known-key name!) When we need to do an original name cache lookup we rely on the parser implemented in isBuiltInOcc_maybe. * HscMain.allKnownKeyNames was folded into PrelInfo.knownKeyNames. * Lots of comments were sprinkled about describing the new scheme. Updates haddock submodule. Test Plan: Validate Reviewers: niteria, simonpj, austin, hvr Reviewed By: simonpj Subscribers: simonmar, niteria, thomie Differential Revision: https://phabricator.haskell.org/D2467 GHC Trac Issues: #12532, #12415
* Fix #10923 by fingerprinting optimization level.Edward Z. Yang2016-09-021-2/+8
| | | | | | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonmar, austin, bgamari, thomie, rwbarton Differential Revision: https://phabricator.haskell.org/D2509 GHC Trac Issues: #10923
* Some alpha renamingIan Lynagh2012-10-161-1/+1
| | | | | Mostly d -> g (matching DynFlag -> GeneralFlag). Also renamed if* to when*, matching the Haskell if/when names
* Make -fscc-profiling a dynamic flagIan Lynagh2012-07-241-2/+1
| | | | All the flags that 'ways' imply are now dynamic
* Make -fPIC a dynamic flagIan Lynagh2012-07-161-1/+1
| | | | | | Hopefully I've kept the logic the same, and we now generate warnings if the user does -fno-PIC but we ignore them (e.g. because they're on OS X amd64).
* Make a picPOpts functionIan Lynagh2012-07-161-2/+2
| | | | | We now handle the preprocessor options the same way as the gcc options (picCCOpts).
* Omit -osuf/-odir -hisuf/-hidir and -stubdir from the flag checkerSimon Marlow2012-03-011-6/+32
| | | | | | | The reasoning is that GHC will only skip recompilation if it has found a valid up-to-date object file and .hi file, so there is no need to also check that these flags have not changed, and indeed there are valid reasons to want to change them.
* oops, a Bool is a little *too* lax (#5878)Simon Marlow2012-02-161-1/+2
|
* Be less conservative about recompiling after changes to -main-is (#5878)Simon Marlow2012-02-161-3/+4
|
* Don't record outputFile in the hashed flagsSimon Marlow2012-01-031-1/+3
| | | | | | | | | | | We don't want ghc --make M -o <file> to force recompilation of all modules when <file> changes. The -o value is already taken into account by the recompilation machinery when we check the modification time on the object file or the executable.
* Take into account -fprof-auto-*Simon Marlow2011-12-071-1/+5
|
* Keep the flag lists as IntSets rather than listsSimon Marlow2011-11-231-2/+2
| | | | This improves compile times slightly.
* Normalise FilePaths before hashing (fixes base01)Simon Marlow2011-11-111-3/+7
|
* Remove cruft code from FlagCheckerDavid Terei2011-11-101-103/+1
|
* Add more flags to the recompilation check (#437)Simon Marlow2011-11-101-19/+21
| | | | | | | Now included: - all language flags - all filename-related flags (-i, -osuf, -hidir etc.) - all CPP-related flags (-I, -D, -U)
* Fix #437: recompilation check includes flagsDavid Terei2011-11-091-0/+143