- 18 Jun, 2011 2 commits
-
-
dterei authored
While we previously checked the safety of safe imported modules we didn't do this check transitively. This can be a problem when we depend on a trustworthy module in a package that is no longer trusted, so we should fail compilation. We already stored in an interface file the transitive list of packages a module depends on. Now we extend that list to include a flag saying if we depend on that package being trusted as well.
-
dterei authored
This patch disables the use of some GHC extensions in Safe mode and also the use of certain flags. Some are disabled completely while others are only allowed on the command line and not in source PRAGMAS. We also check that Safe imports are indeed importing a Safe or Trustworthy module.
-
- 31 May, 2011 1 commit
-
-
dterei authored
-
- 08 May, 2011 1 commit
-
-
Ian Lynagh authored
And remove cTargetOS/cTargetPlatform.
-
- 07 May, 2011 2 commits
-
-
Ian Lynagh authored
-
Ian Lynagh authored
-
- 04 May, 2011 1 commit
-
-
dterei authored
Instead of using the GNU As subsection feature on Linux/Windows for TNTC we now use the LLVM Mangler on all platforms.
-
- 01 May, 2011 1 commit
-
-
Ian Lynagh authored
-
- 29 Apr, 2011 1 commit
-
-
Ian Lynagh authored
I've made cpp_args include gcc_args. It effectively didn't before, but seeing as gcc_args sometimes has -D flags in, I think doing so is the right thing to do.
-
- 26 Apr, 2011 1 commit
-
-
dterei authored
-
- 21 Apr, 2011 1 commit
-
-
Ian Lynagh authored
-
- 17 Apr, 2011 1 commit
-
-
Ian Lynagh authored
Also a small refactoring in how the verbosity flag is handled.
-
- 14 Apr, 2011 1 commit
-
-
Simon Marlow authored
otherwise some versions of gcc complain about a missing final newline.
-
- 12 Apr, 2011 2 commits
-
-
Simon Marlow authored
Previously the code generator generated small code fragments labelled with __stginit_M for each module M, and these performed whatever initialisation was necessary for that module and recursively invoked the initialisation functions for imported modules. This appraoch had drawbacks: - FFI users had to call hs_add_root() to ensure the correct initialisation routines were called. This is a non-standard, and ugly, API. - unless we were using -split-objs, the __stginit dependencies would entail linking the whole transitive closure of modules imported, whether they were actually used or not. In an extreme case (#4387, #4417), a module from GHC might be imported for use in Template Haskell or an annotation, and that would force the whole of GHC to be needlessly linked into the final executable. So now instead we do our initialisation with C functions marked with __attribute__((constructor)), which are automatically invoked at program startup time (or DSO load-time). The C initialisers are emitted into the stub.c file. This means that every time we compile with -prof or -hpc, we now get a stub file, but thanks to #3687 that is now invisible to the user. There are some refactorings in the RTS (particularly for HPC) to handle the fact that initialisers now get run earlier than they did before. The __stginit symbols are still generated, and the hs_add_root() function still exists (but does nothing), for backwards compatibility.
-
Simon Marlow authored
This code has accumulated a great deal of cruft over the years, this pass cleans up a lot of the surrounding cruft but leaves the actual argument processing alone - so there's still more that could be done. Bug fixed: - ghc_rts_opts should not be subject to the --rtsopts setting. If the programmer explicitly declares options with ghc_rts_opts, they shouldn't also have to accept command-line RTS options to make them work.
-
- 08 Apr, 2011 1 commit
-
-
Simon Marlow authored
A common sequence of commands (at least for me) is this: $ ghc hello 1 of 1] Compiling Main ( hello.hs, hello.o ) Linking hello ... $ ./hello +RTS -s hello: Most RTS options are disabled. Link with -rtsopts to enable them. $ ghc hello -rtsopts $ grr, nothing happened. I could use -fforce-recomp, but if this was a large program I probably don't want to recompile it all again, so: $ rm hello removed `hello' $ ghc hello -rtsopts Linking hello ... $ ./hello +RTS -s ./hello +RTS -s Hello World! 51,264 bytes allocated in the heap 2,904 bytes copied during GC 43,808 bytes maximum residency (1 sample(s)) 17,632 bytes maximum slop etc. With this patch, GHC notices when the options have changed and forces a relink, so you don't need to rm the binary or use -fforce-recomp. This is done by adding the pertinent stuff to the binary in a special section called ".debug-ghc-link-info": $ readelf -p .debug-ghc-link-info ./hello String dump of section 'ghc-linker-opts': [ 0] (["-lHSbase-4.3.1.0","-lHSinteger-gmp-0.2.0.2","-lgmp","-lHSghc-prim-0.2.0.0","-lHSrts","-lm","-lrt","-ldl","-u","ghczmprim_GHCziTypes_Izh_static_info","-u","ghczmprim_GHCziTypes_Czh_static_info","-u","ghczmprim_GHCziTypes_Fzh_static_info","-u","ghczmprim_GHCziTypes_Dzh_static_info","-u","base_GHCziPtr_Ptr_static_info","-u","base_GHCziWord_Wzh_static_info","-u","base_GHCziInt_I8zh_static_info","-u","base_GHCziInt_I16zh_static_info","-u","base_GHCziInt_I32zh_static_info","-u","base_GHCziInt_I64zh_static_info","-u","base_GHCziWord_W8zh_static_info","-u","base_GHCziWord_W16zh_static_info","-u","base_GHCziWord_W32zh_static_info","-u","base_GHCziWord_W64zh_static_info","-u","base_GHCziStable_StablePtr_static_info","-u","ghczmprim_GHCziTypes_Izh_con_info","-u","ghczmprim_GHCziTypes_Czh_con_info","-u","ghczmprim_GHCziTypes_Fzh_con_info","-u","ghczmprim_GHCziTypes_Dzh_con_info","-u","base_GHCziPtr_Ptr_con_info","-u","base_GHCziPtr_FunPtr_con_info","-u","base_GHCziStable_StablePtr_con_info","-u","ghczmprim_GHCziTypes_False_closure","-u","ghczmprim_GHCziTypes_True_closure","-u","base_GHCziPack_unpackCString_closure","-u","base_GHCziIOziException_stackOverflow_closure","-u","base_GHCziIOziException_heapOverflow_closure","-u","base_ControlziExceptionziBase_nonTermination_closure","-u","base_GHCziIOziException_blockedIndefinitelyOnMVar_closure","-u","base_GHCziIOziException_blockedIndefinitelyOnSTM_closure","-u","base_ControlziExceptionziBase_nestedAtomically_closure","-u","base_GHCziWeak_runFinalizzerBatch_closure","-u","base_GHCziTopHandler_runIO_closure","-u","base_GHCziTopHandler_runNonIO_closure","-u","base_GHCziConcziIO_ensureIOManagerIsRunning_closure","-u","base_GHCziConcziSync_runSparks_closure","-u","base_GHCziConcziSignal_runHandlers_closure","-lHSffi"],Nothing,RtsOptsAll,False,[],[]) And GHC itself uses the readelf command to extract it when deciding whether to relink. The reason for the name ".debug-ghc-link-info" is that sections beginning with ".debug" are removed automatically by strip. This currently only works on Linux; Windows and OS X still have the old behaviour.
-
- 06 Apr, 2011 1 commit
-
-
Simon Marlow authored
to the way stub files were handled.
-
- 05 Apr, 2011 2 commits
-
-
Simon Marlow authored
-
Simon Marlow authored
Now GHC still generates the _stub.c files, but the object file is automatically merged into the main .o file for a module. This means that build systems (including GHC's own) no longer need to worry about looking for _stub.o files and including them when linking. I had to do lots of refactoring in DriverPipeline to make this work; now there's a monad to carry around all the information, and everything is a lot tidier. The _stub.c is now created as a temporary file and removed after compilation (unless the -keep-tmp-files flag is on).
-
- 04 Apr, 2011 2 commits
-
-
Ian Lynagh authored
-
Austin Seipp authored
-
- 09 Mar, 2011 1 commit
-
-
altaic authored
-
- 22 Feb, 2011 1 commit
-
-
Ian Lynagh authored
-
- 18 Dec, 2010 1 commit
-
-
Ian Lynagh authored
-
- 10 Nov, 2010 1 commit
-
-
Ian Lynagh authored
-
- 27 Oct, 2010 1 commit
-
-
Simon Marlow authored
While trying to fix #1666 (-Werror aborts too early) I decided to some tidyup in GHC/DriverPipeline/HscMain. - The GhcMonad overloading is gone from DriverPipeline and HscMain now. GhcMonad is now defined in a module of its own, and only used in the top-level GHC layer. DriverPipeline and HscMain use the plain IO monad and take HscEnv as an argument. - WarnLogMonad is gone. printExceptionAndWarnings is now called printException (the old name is deprecated). Session no longer contains warnings. - HscMain has its own little monad that collects warnings, and also plumbs HscEnv around. The idea here is that warnings are collected while we're in HscMain, but on exit from HscMain (any function) we check for warnings and either print them (via log_action, so IDEs can still override the printing), or turn them into an error if -Werror is on. - GhcApiCallbacks is gone, along with GHC.loadWithLogger. Thomas Schilling told me he wasn't using these, and I don't see a good reason to have them. - there's a new pure API to the parser (suggestion from Neil Mitchell): parser :: String -> DynFlags -> FilePath -> Either ErrorMessages (WarningMessages, Located (HsModule RdrName))
-
- 23 Oct, 2010 1 commit
-
-
Ian Lynagh authored
-
- 12 Oct, 2010 1 commit
-
-
Ian Lynagh authored
We used to define these CPP symbols, but nothing on hackage uses them and the first 2 are no longer correct (as we support multiple Haskell versions).
-
- 06 Oct, 2010 1 commit
-
-
Ian Lynagh authored
The default language is now Haskell2010, so this was a little odd. Also, --make is now on by default, so this was largely irrelevant.
-
- 18 Sep, 2010 2 commits
-
-
kili authored
-
Ian Lynagh authored
and remove the temporary DOpt class workaround.
-
- 08 Sep, 2010 1 commit
-
-
Ian Lynagh authored
-
- 20 Aug, 2010 1 commit
-
-
Ian Lynagh authored
In case the RTS is being explicitly linked in. For #3807.
-
- 13 Aug, 2010 1 commit
-
-
dterei authored
-
- 05 Aug, 2010 2 commits
-
-
Ian Lynagh authored
If we start with a .cmmcpp file then they don't get flattened in the CmmCpp phase, as we don't run that phase.
-
Ian Lynagh authored
The default is a new "some" state, which allows only known-safe flags that we want on by default. Currently this is only "--info".
-
- 29 Jul, 2010 1 commit
-
-
Ian Lynagh authored
-
- 26 Jul, 2010 1 commit
-
-
dterei authored
-
- 24 Jul, 2010 2 commits
-
-
Ian Lynagh authored
-
Ian Lynagh authored
We now first collect the option instructions (from the commandline, from pragmas in source files, etc), and then later flatten them into the list of enabled options. This will enable us to use different standards (H98, H2010, etc) as a base upon which to apply the instructions, when we don't know what the base will be when we start collecting instructions.
-