[GHC] #8641: ghc with -odir and -prof (or any stub file) does not create the specified output directory

GHC ghc-devs at haskell.org
Thu Apr 10 22:13:16 UTC 2014


#8641: ghc with -odir and -prof (or any stub file) does not create the specified
output directory
---------------------------------------+-----------------------------------
        Reporter:  wmarshall           |            Owner:  ezyang
            Type:  bug                 |           Status:  new
        Priority:  normal              |        Milestone:
       Component:  Compiler            |          Version:  7.9
      Resolution:                      |         Keywords:
Operating System:  Unknown/Multiple    |     Architecture:
 Type of failure:  Compile-time crash  |  Unknown/Multiple
       Test Case:                      |       Difficulty:  Unknown
        Blocking:                      |       Blocked By:
                                       |  Related Tickets:
---------------------------------------+-----------------------------------

Comment (by ezyang):

 Proposed patch:

 {{{
 diff --git a/compiler/main/DriverPipeline.hs
 b/compiler/main/DriverPipeline.hs
 index 2c71967..93edf05 100644
 --- a/compiler/main/DriverPipeline.hs
 +++ b/compiler/main/DriverPipeline.hs
 @@ -1261,6 +1261,10 @@ runPhase (RealPhase SplitAs) _input_fn dflags

          liftIO $ createDirectoryIfMissing True split_odir

 +        -- we create directories for the object file, because it
 +        -- might be a hierarchical module.
 +        liftIO $ createDirectoryIfMissing True (takeDirectory output_fn)
 +
          -- remove M_split/ *.o, because we're going to archive M_split/
 *.o
          -- later and we don't want to pick up any old objects.
          fs <- liftIO $ getDirectoryContents split_odir
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8641#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list