From: simonpj Date: Tue, 16 Oct 2001 15:14:41 +0000 (+0000) Subject: [project @ 2001-10-16 15:14:41 by simonpj] X-Git-Tag: Approximately_9120_patches~820 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=6e3256b8c5300fc97ebc127f18a092f3fc7fc47d;p=ghc-hetmet.git [project @ 2001-10-16 15:14:41 by simonpj] Hacky fix to paths for cpp; dont merge --- diff --git a/ghc/compiler/main/DriverPipeline.hs b/ghc/compiler/main/DriverPipeline.hs index 0db9de7..92f22d0 100644 --- a/ghc/compiler/main/DriverPipeline.hs +++ b/ghc/compiler/main/DriverPipeline.hs @@ -374,7 +374,15 @@ run_phase Cpp basename suff input_fn output_fn ++ map SysTools.Option md_c_flags ++ [ SysTools.Option "-x" , SysTools.Option "c" - , SysTools.FileOption "" input_fn + , SysTools.Option input_fn + -- We hackily use Option instead of FileOption here, so that the file + -- name is not back-slashed on Windows. cpp is capable of + -- dealing with / in filenames, so it works fine. Furthermore + -- if we put in backslashes, cpp outputs #line directives + -- with *double* backslashes. And that in turn means that + -- our error messages get double backslashes in them. + -- In due course we should arrange that the lexer deals + -- with these \\ escapes properly. , SysTools.Option "-o" , SysTools.FileOption "" output_fn ])