From: wolfgang.thaller@gmx.net Date: Fri, 1 Dec 2006 12:53:04 +0000 (+0000) Subject: Decouple -O from -fvia-C X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=8971f720a67113308e346598814221228b12a4fc Decouple -O from -fvia-C Nowadays, there are situations where -fvia-C is definitely unwanted, such as when -fPIC is used on some platforms, so we do not want implicit -fvia-C any more. --- diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 2ba6172..8de1eec 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -540,9 +540,7 @@ data Option updOptLevel :: Int -> DynFlags -> DynFlags -- Set dynflags appropriate to the optimisation level updOptLevel n dfs - = if (n >= 1) - then dfs2{ hscTarget = HscC, optLevel = n } -- turn on -fvia-C with -O - else dfs2{ optLevel = n } + = dfs2{ optLevel = n } where dfs1 = foldr (flip dopt_unset) dfs remove_dopts dfs2 = foldr (flip dopt_set) dfs1 extra_dopts diff --git a/docs/users_guide/phases.xml b/docs/users_guide/phases.xml index cd18469..2f74a6b 100644 --- a/docs/users_guide/phases.xml +++ b/docs/users_guide/phases.xml @@ -567,9 +567,7 @@ $ cat foo.hspp Use GHC's native code generator rather than compiling via C. This will compile faster (up to twice as fast), but may produce code that is slightly slower than - compiling via C. is the default - when optimisation is off (see ). + compiling via C. is the default. @@ -580,9 +578,8 @@ $ cat foo.hspp Compile via C instead of using the native code - generator. This is default for optimised compilations, - and on architectures for which GHC doesn't have a native - code generator. + generator. This is the default on architectures for which GHC + doesn't have a native code generator. diff --git a/docs/users_guide/sooner.xml b/docs/users_guide/sooner.xml index ec1bb3d..19c1c11 100644 --- a/docs/users_guide/sooner.xml +++ b/docs/users_guide/sooner.xml @@ -200,9 +200,6 @@ should go here! mind-bogglingly clever. Better to let GCC have a go, as it tries much harder on register allocation, etc. - At the moment, if you turn on you - get GCC instead. This may change in the future. - So, when we want very fast code, we use: . diff --git a/docs/users_guide/using.xml b/docs/users_guide/using.xml index 73f5637..0168123 100644 --- a/docs/users_guide/using.xml +++ b/docs/users_guide/using.xml @@ -1252,10 +1252,6 @@ f "2" = 2 Means: “Generate good-quality code without taking too long about it.” Thus, for example: ghc -c -O Main.lhs - - currently also implies - . This may change in the - future.