Add osuf to the name we use for the split dir
authorIan Lynagh <igloo@earth.li>
Sat, 18 Jul 2009 14:55:22 +0000 (14:55 +0000)
committerIan Lynagh <igloo@earth.li>
Sat, 18 Jul 2009 14:55:22 +0000 (14:55 +0000)
This avoids a collision between the directories we use when compiling
multiple ways, which in turn leads to a race condition in parallel
builds.

compiler/main/DriverPipeline.hs

index c4ac65f..1e342a0 100644 (file)
@@ -1141,8 +1141,8 @@ runPhase SplitAs _stop hsc_env _basename _suff _input_fn get_output_fn maybe_loc
         output_fn <- get_output_fn dflags StopLn maybe_loc
 
         let base_o = dropExtension output_fn
-            split_odir  = base_o ++ "_split"
             osuf = objectSuf dflags
+            split_odir  = base_o ++ "_" ++ osuf ++ "_split"
 
         createDirectoryHierarchy split_odir