[commit: ghc] master: Change how includes for input file directory works (eb2daa2)

git at git.haskell.org git at git.haskell.org
Tue Feb 20 04:02:45 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/eb2daa2b6a83412382aa0fcda598f8b3d40fde2c/ghc

>---------------------------------------------------------------

commit eb2daa2b6a83412382aa0fcda598f8b3d40fde2c
Author: Tamar Christina <tamar at zhox.com>
Date:   Mon Feb 19 22:13:46 2018 -0500

    Change how includes for input file directory works
    
    GHC Used to only allow for one include mode, namely `-I`.  The problem
    with `-I` includes is that it supercedes all other includes, including
    the system include paths.
    
    This is not a problem for paths requested by the user, but it is a
    problem for the ones we implicitly derive and add.
    
    In particular we add the source directory of the input file to the
    include path. This is problematic because it causes any file with the
    name of a system include, to inadvertently loop as the wrong file gets
    included.
    
    Since this is an implicitly include, and as far as I can tell, only done
    so local includes are found (as the sources given to GCC reside in a
    temp folder) then switch from `-I` to `-iquote`.
    
    This requires a submodule update for haddock
    
    Test Plan: ./validate
    
    Reviewers: austin, bgamari, hvr
    
    Reviewed By: bgamari
    
    Subscribers: carter, rwbarton, thomie
    
    GHC Trac Issues: #14312
    
    Differential Revision: https://phabricator.haskell.org/D4080


>---------------------------------------------------------------

eb2daa2b6a83412382aa0fcda598f8b3d40fde2c
 compiler/deSugar/DsForeign.hs    |  3 ++-
 compiler/iface/FlagChecker.hs    |  3 ++-
 compiler/main/DriverPipeline.hs  | 26 +++++++++++++++++--------
 compiler/main/DynFlags.hs        | 42 +++++++++++++++++++++++++++++++++++-----
 docs/users_guide/8.6.1-notes.rst |  3 +++
 utils/haddock                    |  2 +-
 6 files changed, 63 insertions(+), 16 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc eb2daa2b6a83412382aa0fcda598f8b3d40fde2c


More information about the ghc-commits mailing list