Skip to content
  • Matthew Pickering's avatar
    df419c1a
    driver: Cleanups related to ModLocation · df419c1a
    Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
    ModLocation is the data type which tells you the locations of all the
    build products which can affect recompilation. It is now computed in one
    place and not modified through the pipeline. Important locations will
    now just consult ModLocation rather than construct the dynamic object
    path incorrectly.
    
    * Add paths for dynamic object and dynamic interface files to
      ModLocation.
    * Always use the paths from mod location when looking for where to find
      any interface or object file.
    * Always use the paths in a ModLocation when deciding where to write an
      interface and object file.
    * Remove `dynamicOutputFile` and `dynamicOutputHi` functions which
      *calculated* (incorrectly) the location of `dyn_o` and `dyn_hi` files.
    * Don't set `outputFile_` and so-on in `enableCodeGenWhen`, `-o` and
      hence `outputFile_` should not affect the location of object files in
      `--make` mode. It is now sufficient to just update the ModLocation with
      the temporary paths.
    * In `hscGenBackendPipeline` don't recompute the `ModLocation` to
      account for `-dynamic-too`, the paths are now accurate from the start
      of the run.
    * Rename `getLocation` to `mkOneShotModLocation`, as that's the only
      place it's used. Increase the locality of the definition by moving it
      close to the use-site.
    * Load the dynamic interface from ml_dyn_hi_file rather than attempting
      to reconstruct it in load_dynamic_too.
    * Add a variety of tests to check how -o -dyno etc interact with each
      other.
    
    Some other clean-ups
    
    * DeIOify mkHomeModLocation and friends, they are all pure functions.
    * Move FinderOpts into GHC.Driver.Config.Finder, next to initFinderOpts.
    * Be more precise about whether we mean outputFile or outputFile_: there
      were many places where outputFile was used but the result shouldn't have
      been affected by `-dyno` (for example the filename of the resulting
      executable). In these places dynamicNow would never be set but it's
      still more precise to not allow for this possibility.
    * Typo fixes suffices -> suffixes in the appropiate places.
    df419c1a
    driver: Cleanups related to ModLocation
    Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
    ModLocation is the data type which tells you the locations of all the
    build products which can affect recompilation. It is now computed in one
    place and not modified through the pipeline. Important locations will
    now just consult ModLocation rather than construct the dynamic object
    path incorrectly.
    
    * Add paths for dynamic object and dynamic interface files to
      ModLocation.
    * Always use the paths from mod location when looking for where to find
      any interface or object file.
    * Always use the paths in a ModLocation when deciding where to write an
      interface and object file.
    * Remove `dynamicOutputFile` and `dynamicOutputHi` functions which
      *calculated* (incorrectly) the location of `dyn_o` and `dyn_hi` files.
    * Don't set `outputFile_` and so-on in `enableCodeGenWhen`, `-o` and
      hence `outputFile_` should not affect the location of object files in
      `--make` mode. It is now sufficient to just update the ModLocation with
      the temporary paths.
    * In `hscGenBackendPipeline` don't recompute the `ModLocation` to
      account for `-dynamic-too`, the paths are now accurate from the start
      of the run.
    * Rename `getLocation` to `mkOneShotModLocation`, as that's the only
      place it's used. Increase the locality of the definition by moving it
      close to the use-site.
    * Load the dynamic interface from ml_dyn_hi_file rather than attempting
      to reconstruct it in load_dynamic_too.
    * Add a variety of tests to check how -o -dyno etc interact with each
      other.
    
    Some other clean-ups
    
    * DeIOify mkHomeModLocation and friends, they are all pure functions.
    * Move FinderOpts into GHC.Driver.Config.Finder, next to initFinderOpts.
    * Be more precise about whether we mean outputFile or outputFile_: there
      were many places where outputFile was used but the result shouldn't have
      been affected by `-dyno` (for example the filename of the resulting
      executable). In these places dynamicNow would never be set but it's
      still more precise to not allow for this possibility.
    * Typo fixes suffices -> suffixes in the appropiate places.
Loading