Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#7038 closed bug (invalid)

hidir/odir flags mixup modules

Reported by: br1 Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.5
Keywords: Cc:
Operating System: MacOS X Architecture: x86_64 (amd64)
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


When using hidir and odir ghc flags, "ghc -- make" creates Main.hs and Main.o no matter the name of the input file. Later compiling a different file picks up the old Main.o. This reproduces the issue:

echo "main = putStrLn \"1\"" > main1.hs echo "main = putStrLn \"2\"" > main2.hs ghc --make main1.hs -odir dir -hidir dir ghc --make main2.hs -odir dir -hidir dir ./main1 ./main2

The output is

[1 of 1] Compiling Main ( main1.hs, dir/Main.o ) Linking main1 ... Linking main2 ... 1 1

Change History (2)

comment:1 Changed 5 years ago by simonmar

difficulty: Unknown
Resolution: invalid
Status: newclosed

comment:2 Changed 5 years ago by br1

I see, thanks. I was comparing the compile speed of an HList program for different list lengths and GHC versions. I used one Main for each list length, and separate hidirs/odirs for each GHC version, so the dependencies can be compiled before the actual tests. I'll try the main-is flag.

Note: See TracTickets for help on using tickets.