From da9b43e1c5d143bfcc5f6a669001e94cf7654a30 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Mon, 23 Oct 2006 14:58:17 +0000 Subject: [PATCH] wibble in parseStaticFlags should fix profiling and unreg in HEAD --- compiler/main/StaticFlags.hs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/compiler/main/StaticFlags.hs b/compiler/main/StaticFlags.hs index 54f5953..9378c0a 100644 --- a/compiler/main/StaticFlags.hs +++ b/compiler/main/StaticFlags.hs @@ -99,14 +99,17 @@ parseStaticFlags args = do let unreg_flags | cGhcUnregisterised == "YES" = unregFlags | otherwise = [] + (more_leftover, errs) <- processArgs static_flags (unreg_flags ++ way_flags) + -- TABLES_NEXT_TO_CODE affects the info table layout. + -- Be careful to do this *after* all processArgs, + -- because evaluating tablesNextToCode involves looking at the global + -- static flags. Those pesky global variables... let cg_flags | tablesNextToCode = ["-optc-DTABLES_NEXT_TO_CODE"] | otherwise = [] - (more_leftover, errs) <- processArgs static_flags - (unreg_flags ++ cg_flags ++ way_flags) when (not (null errs)) $ ghcError (UsageError (unlines errs)) - return (more_leftover++leftover) + return (cg_flags++more_leftover++leftover) -- note that ordering is important in the following list: any flag which -- 1.7.10.4