X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fmain%2FDriverState.hs;h=a34d4a101aa79cd857c1f7994ef56705ba5fbd3a;hb=423d477bfecd490de1449c59325c8776f91d7aac;hp=cad7f2b5c382ecb8ff2efd2124fece92a95d06c3;hpb=53348577998780c487389991faca3bff9f2318d6;p=ghc-hetmet.git diff --git a/ghc/compiler/main/DriverState.hs b/ghc/compiler/main/DriverState.hs index cad7f2b..a34d4a1 100644 --- a/ghc/compiler/main/DriverState.hs +++ b/ghc/compiler/main/DriverState.hs @@ -1,5 +1,4 @@ ----------------------------------------------------------------------------- --- $Id: DriverState.hs,v 1.100 2004/02/25 11:31:24 simonmar Exp $ -- -- Settings for the driver -- @@ -9,7 +8,7 @@ module DriverState where -#include "../includes/config.h" +#include "../includes/ghcconfig.h" #include "HsVersions.h" import ParsePkgConf ( loadPackageConfig ) @@ -65,19 +64,19 @@ setMode m flag = do isCompManagerMode DoMake = True isCompManagerMode DoInteractive = True +isCompManagerMode (DoEval _) = True isCompManagerMode _ = False ----------------------------------------------------------------------------- -- Global compilation flags --- Cpp-related flags -v_Hs_source_cpp_opts = global +-- Default CPP defines in Haskell source +hsSourceCppOpts = [ "-D__HASKELL1__="++cHaskell1Version , "-D__GLASGOW_HASKELL__="++cProjectVersionInt , "-D__HASKELL98__" , "-D__CONCURRENT_HASKELL__" ] -{-# NOINLINE v_Hs_source_cpp_opts #-} -- Keep output from intermediate phases @@ -211,6 +210,10 @@ GLOBAL_VAR(v_Framework_paths, [], [String]) GLOBAL_VAR(v_Cmdline_frameworks, [], [String]) #endif +addToOrDeleteDirList :: IORef [String] -> String -> IO () +addToOrDeleteDirList ref "" = writeIORef ref [] +addToOrDeleteDirList ref path = addToDirList ref path + addToDirList :: IORef [String] -> String -> IO () addToDirList ref path = do paths <- readIORef ref @@ -573,7 +576,7 @@ way_details :: [ (WayName, Way) ] way_details = [ (WayThreaded, Way "thr" True "Threaded" [ #if defined(freebsd_TARGET_OS) - , "-optc-pthread" + "-optc-pthread" #endif ] ),