| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch implements Backpack for GHC. It's a big patch but I've tried quite
hard to keep things, by-in-large, self-contained.
The user facing specification for Backpack can be found at:
https://github.com/ezyang/ghc-proposals/blob/backpack/proposals/0000-backpack.rst
A guide to the implementation can be found at:
https://github.com/ezyang/ghc-proposals/blob/backpack-impl/proposals/0000-backpack-impl.rst
Has a submodule update for Cabal, as well as a submodule update
for filepath to handle more strict checking of cabal-version.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, austin, simonmar, bgamari, goldfire
Subscribers: thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D1482
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In GHC < 8.0.1, the value of `__GLASGOW_HASKELL_LLVM__`, exposed
through the preprocessor when compiled with `-fllvm`, was an integer
value, encoded according to some rules specified in the user guide.
Due to an oversight, in GHC 8.0.1 the value of this define became a
tuple, exposed as e.g. `(3, 7)`. This was an unintended regression.
This patch turns the value of the `__GLASGOW_HASKELL_LLVM__` definition
into a single integer again, but changes the formatting of said number
slightly. Before, any LLVM version where the major or minor component >=
10 would cause ambiguous values for `__GLASGOW_HASKELL_LLVM__`. With
this patch, the value is in line with `__GLASGOW_HASKELL__`, adding a
padding `0` in-between major and minor component if applicable (we
assume no minors >= 100 will ever exist).
The documentation in the user guide is updated accordingly, and a
reference is made in the 8.0.2 release notes.
Test Plan: validate
Reviewers: bgamari, erikd
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2552
GHC Trac Issues: #12628
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This isn't strictly necessary for deterministic ABIs.
The results of eltsHpt are consumed in two ways:
1) they determine the order of linking
2) if you track the data flow all the family instances get put in
FamInstEnvs, so the nondeterministic order is forgotten.
3) same for VectInfo stuff
4) same for Annotations
The problem is that I haven't found a nice way to do 2. in
a local way and 1. is nice to have if we went for deterministic
object files. Besides these maps are keyed on ModuleNames so they
should be small relative to other things and the overhead should
be negligible.
As a bonus we also get more specific names.
Test Plan: ./validate
Reviewers: bgamari, austin, hvr, ezyang, simonmar
Reviewed By: simonmar
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2300
GHC Trac Issues: #4012
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: validate
Reviewers: thomie, austin, bgamari
Reviewed By: bgamari
Subscribers: hvr
Differential Revision: https://phabricator.haskell.org/D2058
GHC Trac Issues: #11763
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define MIN_VERSION_pkgname and VERSION_pkgname macros for all exposed
packages, without requiring -hide-all-packages.
See #10970 comment 7-10 for discussion.
Reviewers: duncan, ezyang, bgamari, austin
Reviewed By: ezyang
Subscribers: hvr, rwbarton
Differential Revision: https://phabricator.haskell.org/D1869
GHC Trac Issues: #10970
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DEC OSF/1 (aka Tru64 UNIX) has been discontinued a few years ago already[1].
This removes the undoubtedly bitrotten support for `OSOsf3 :: OS` from GHC's
code-base.
Support for `ArchAlpha :: Arch` may be removed at some later point, as there
may still be users out there running a more or less recent Linux/alpha
distribution on their more-than-a-decade old Alpha hardware...
[1]: https://en.wikipedia.org/wiki/Tru64_UNIX
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Remove `.hi` and `.o` files if the flags `no-keep-hi-files` and
`no-keep-o-files` are given.
Test Plan: ./validate
Reviewers: austin, thomie, bgamari
Reviewed By: thomie, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2021
GHC Trac Issues: #4114
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using Clang as the C compiler, over 100 tests were failing
due to Clang reporting that some command line arguments were not
being used. These warnings only occur when Clang is compiling
assembler files which happens in two places, one of which already
conditionally adding `-Qunused-arguments` to the command line when
the compiler was Clang. This fixes the other.
Test Plan: validate with clang as the C compiler
Reviewers: bgamari, hvr, austin, rwbarton
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1998
GHC Trac Issues: #11684
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Both gcc and clang tell which warning flag a reported warning can be
controlled with, this patch makes ghc do the same. More generally, this
allows for annotated compiler output, where an optional annotation is
displayed in brackets after the severity.
This also adds a new flag `-f(no-)show-warning-groups` to control
whether to show which warning-group (such as `-Wall` or `-Wcompat`)
a warning belongs to. This flag is on by default.
This implements #10752
Reviewed By: quchen, bgamari, hvr
Differential Revision: https://phabricator.haskell.org/D1943
|
|
|
|
|
|
|
|
|
|
| |
Refactoring only. It's shorter, and brings
`HasDynFlags/ContainsDynFLags` in line with `HasModule/ContainsModule`.
Introduce `updTopEnv`.
Reviewed by: bgamari
Differential Revision: https://phabricator.haskell.org/D1832
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
In the past the canonical way for constructing an SDoc string literal was the
composition `ptext . sLit`. But for some time now we have function `text` that
does the same. Plus it has some rules that optimize its runtime behaviour.
This patch takes all uses of `ptext . sLit` in the compiler and replaces them
with calls to `text`. The main benefits of this patch are clener (shorter) code
and less dependencies between module, because many modules now do not need to
import `FastString`. I don't expect any performance benefits - we mostly use
SDocs to report errors and it seems there is little to be gained here.
Test Plan: ./validate
Reviewers: bgamari, austin, goldfire, hvr, alanz
Subscribers: goldfire, thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D1784
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The main goal here is enable stack traces in GHCi. After this change,
if you start GHCi like this:
ghci -fexternal-interpreter -prof
(which requires packages to be built for profiling, but not GHC
itself) then the interpreter manages cost-centre stacks during
execution and can produce a stack trace on request. Call locations
are available for all interpreted code, and any compiled code that was
built with the `-fprof-auto` familiy of flags.
There are a couple of ways to get a stack trace:
* `error`/`undefined` automatically get one attached
* `Debug.Trace.traceStack` can be used anywhere, and prints the current
stack
Because the interpreter is running in a separate process, only the
interpreted code is running in profiled mode and the compiler itself
isn't slowed down by profiling.
The GHCi debugger still doesn't work with -fexternal-interpreter,
although this patch gets it a step closer. Most of the functionality
of breakpoints is implemented, but the runtime value introspection is
still not supported.
Along the way I also did some refactoring and added type arguments to
the various remote pointer types in `GHCi.RemotePtr`, so there's
better type safety and documentation in the bridge code between GHC
and ghc-iserv.
Test Plan: validate
Reviewers: bgamari, ezyang, austin, hvr, goldfire, erikd
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1747
GHC Trac Issues: #11047, #11100
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Quoting the POSIX standard for the `-D` C compiler flag:
-D name[=value]
Define name as if by a C-language #define directive.
If no `=value` is given, a value of 1 shall be used.
[...]
Removing this explicit `=1` definition from `-D` flags which are used to
define boolean macro constants makes the CLI invocation a bit more
idiomatic and reduces visual noise in debugging output
(flags containing `=`s are additionally put in single-quotes by GHC)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using `YES`/`NO` causes all sorts of problems as CPP doesn't work on
symbolic tokens but rather on scalar values.
A use like
#if __GLASGOW_HASKELL_TH__==YES
{-# LANGUAGE TemplateHaskell #-}
#endif
doesn't do what one may naively expect, and neither does
#if __GLASGOW_HASKELL_TH__
{-# LANGUAGE TemplateHaskell #-}
#endif
*unless* `YES` happens to evaluate to a non-zero scalar.
`__GLASGOW_HASKELL_TH__ was originally introduced via D396 / #9734.
Fixes #11322
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D1723
|
|
|
|
|
|
|
| |
In 3549c952b535803270872adaf87262f2df0295a4 a `include/ghcversions.h` include
file was introduced which defines `__GLASGOW_HASKELL__` as well.
So there's no need to define it twice.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Working on some code using the GHC API, I found these
functions were useful and wished they were exported. This
commit exports them.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: hvr, thomie
Differential Revision: https://phabricator.haskell.org/D1710
|
|
|
|
|
|
|
|
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: VAlidate
Reviewers: austin, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1703
|
|
|
|
|
|
|
|
|
|
|
|
| |
Explicitly pass "--no-relax" on ArchSPARC64
(as ArchSPARC does) where gcc's default specs
set "-mrelax" which conflicts with "-Wl,-r".
Known architecture will also help extending
sparc NCG support 64-bit ABI.
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
(Apologies for the size of this patch, I couldn't make a smaller one
that was validate-clean and also made sense independently)
(Some of this code is derived from GHCJS.)
This commit adds support for running interpreted code (for GHCi and
TemplateHaskell) in a separate process. The functionality is
experimental, so for now it is off by default and enabled by the flag
-fexternal-interpreter.
Reaosns we want this:
* compiling Template Haskell code with -prof does not require
building the code without -prof first
* when GHC itself is profiled, it can interpret unprofiled code, and
the same applies to dynamic linking. We would no longer need to
force -dynamic-too with TemplateHaskell, and we can load ordinary
objects into a dynamically-linked GHCi (and vice versa).
* An unprofiled GHCi can load and run profiled code, which means it
can use the stack-trace functionality provided by profiling without
taking the performance hit on the compiler that profiling would
entail.
Amongst other things; see
https://ghc.haskell.org/trac/ghc/wiki/RemoteGHCi for more details.
Notes on the implementation are in Note [Remote GHCi] in the new
module compiler/ghci/GHCi.hs. It probably needs more documenting,
feel free to suggest things I could elaborate on.
Things that are not currently implemented for -fexternal-interpreter:
* The GHCi debugger
* :set prog, :set args in GHCi
* `recover` in Template Haskell
* Redirecting stdin/stdout for the external process
These are all doable, I just wanted to get to a working validate-clean
patch first.
I also haven't done any benchmarking yet. I expect there to be slight hit
to link times for byte code and some penalty due to having to
serialize/deserialize TH syntax, but I don't expect it to be a serious
problem. There's also lots of low-hanging fruit in the byte code
generator/linker that we could exploit to speed things up.
Test Plan:
* validate
* I've run parts of the test suite with
EXTRA_HC_OPTS=-fexternal-interpreter, notably tests/ghci and tests/th.
There are a few failures due to the things not currently implemented
(see above).
Reviewers: simonpj, goldfire, ezyang, austin, alanz, hvr, niteria, bgamari, gibiansky, luite
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1562
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This exposes `template-haskell` functions for querying the language
extensions which are enabled when compiling a module,
- an `isExtEnabled` function to check whether an extension is enabled
- an `extsEnabled` function to obtain a full list of enabled extensions
To avoid code duplication this adds a `GHC.LanguageExtensions` module to
`ghc-boot` and moves `DynFlags.ExtensionFlag` into it. A happy
consequence of this is that the ungainly `DynFlags` lost around 500
lines. Moreover, flags corresponding to language extensions are now
clearly distinguished from other flags due to the `LangExt.*` prefix.
Updates haddock submodule.
This fixes #10820.
Test Plan: validate
Reviewers: austin, spinda, hvr, goldfire, alanz
Reviewed By: goldfire
Subscribers: mpickering, RyanGlScott, hvr, simonpj, thomie
Differential Revision: https://phabricator.haskell.org/D1200
GHC Trac Issues: #10820
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are currently 2 different ways to test for a static or dynamic
build:
* Test if WayDyn is in ways
* Test if Opt_Static is set
The problem is that these can easily go out of sync, especially when
using the
GHC API.
This commit replaces all queries of Opt_Static with an equivalent query
of
WayDyn. This would have prevented bug #8294 and fixes #11154.
Reviewers: hvr, austin, bgamari
Reviewed By: austin, bgamari
Differential Revision: https://phabricator.haskell.org/D1607
GHC Trac Issues: #10636
|
|
|
|
|
| |
This reverts commit 8cba907ad404ba4005558b5a8966390159938172 which
broke `-ddump-to-file`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch creates empty dump file when GHC was run with
`-ddump-rule-firings` (or `-ddump-rule-rewrites`) and `-ddump-to-file`
specified, and there were no rules applied. If dump already exists it
will be overwritten by empty one.
Test Plan: ./validate
Reviewers: austin, thomie, bgamari
Reviewed By: thomie, bgamari
Subscribers: thomie
Projects: #ghc
Differential Revision: https://phabricator.haskell.org/D1514
GHC Trac Issues: #10320
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This reverts commit 06d46b1e4507e09eb2a7a04998a92610c8dc6277.
This also has a Haddock submodule update.
Test Plan: validate
Reviewers: simonpj, austin, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1475
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a flag -split-sections that does similar things to
-split-objs, but using sections in single object files instead of
relying on the Satanic Splitter and other abominations. This is very
similar to the GCC flags -ffunction-sections and -fdata-sections.
The --gc-sections linker flag, which allows unused sections to actually
be removed, is added to all link commands (if the linker supports it) so
that space savings from having base compiled with sections can be
realized.
Supported both in LLVM and the native code-gen, in theory for all
architectures, but really tested on x86 only.
In the GHC build, a new SplitSections variable enables -split-sections
for relevant parts of the build.
Test Plan: validate with both settings of SplitSections
Reviewers: dterei, Phyx, austin, simonmar, thomie, bgamari
Reviewed By: simonmar, thomie, bgamari
Subscribers: hsyl20, erikd, kgardas, thomie
Differential Revision: https://phabricator.haskell.org/D1242
GHC Trac Issues: #8405
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch tackles two issues:
1) GHC stores a "link info" string into a ELF section. Initially a
section with type "note" was used but GHC didn't follow the ELF
specification which specifies a record-based format for these sections.
With D1375 we switched to a "progbits" section type for which there
isn't any format constraint. This is an issue for D1242 which use GCC's
--gc-sections which collects "unused" sections, such as our section
containing link info... In this patch, we fall back to a section with
type "note" but we respect the specified format.
2) Reading back the ELF section was done by parsing the result of a
call to "readelf". Calling readelf is problematic because the program
may not be available or it may be renamed on some platforms (see
D1326). Moreover we have no garanty that its output layout will stay
the same in future releases of readelf. Finally we would need to fix
the parsing to support "note" sections because of 1. Instead, this
patch proposes to use Data.Binary.Get to directly read the "link info"
note into its section. ELF has a specification, hence it should work on
every conforming platform.
This patch "reverts" D1375, hence it supersedes D1432. It makes D1326
not necessary anymore.
Test Plan:
- recomp011 should pass (test that relinking is avoided when both "link
info" match)
- we should add a test for ELF objects with more than 0xff00 sections
=> added test "recomp015"
- we should check that GAS generates 32-bit words with .int on every
supported platform using ELF (or find a place where this is
documented). harbomaster and I (@hsyl20) only tested on x86-64. On
platforms where it is not true, it should make recomp011 fail. =>
tested to work on Linux/amd64, Solaris/i386 and OpenBSD/amd64
Reviewers: olsner, ony, thomie, kgardas, austin, bgamari
Reviewed By: thomie, bgamari
Subscribers: kgardas, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D1381
GHC Trac Issues: #10974, #11022
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: bgamari, austin
Reviewed By: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1442
GHC Trac Issues: #11063
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the `.debug-ghc-link-info` section was of type `SHT_NOTE` but
this is not compliant with the ELF specification, which requires that
`NOTE` sections are in a particular record-based format. We mark this
section as `PROGBITS` instead, which is defined as implying no
particular format.
Fixes #11022.
Reviewers: bgamari, austin
Reviewed By: bgamari, austin
Subscribers: thomie, hsyl20
Differential Revision: https://phabricator.haskell.org/D1375
GHC Trac Issues: #11022
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: validate
Reviewers: austin, thomie, bgamari
Reviewed By: thomie
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1349
GHC Trac Issues: #10970
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
|
|
|
|
|
| |
Comes with Haddock submodule update.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this commit, GHC only supported LLVM 3.6. Now it only supports
LLVM 3.7 which was released in August 2015. LLVM version 3.6 and earlier
do not work on AArch64/Arm64, but 3.7 does.
Also:
* Add CC_Ghc constructor to LlvmCallConvention.
* Replace `maxSupportLlvmVersion`/`minSupportLlvmVersion` with
a single `supportedLlvmVersion` variable.
* Get `supportedLlvmVersion` from version specified in configure.ac.
* Drop llvmVersion field from DynFlags (no longer needed because only
one version is supported).
Test Plan: Validate on x86_64 and arm
Reviewers: bgamari, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1320
GHC Trac Issues: #10953
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
We had a duplicate copy of the code for --make and for -c
which was a pain. The call graph looked something like this:
compileOne -> genericHscCompileGetFrontendResult -> genericHscFrontend
hscCompileOneShot ---^
with genericHscCompileGetFrontendResult and hscCompileOneShot
duplicating logic for deciding whether or not recompilation
was needed.
This patchset fixes it, so now everything goes through this call-chain:
compileOne (--make entry point)
Calls hscIncrementCompile, invokes the pipeline to do codegen
and sets up linkables.
hscIncrementalCompile (-c entry point)
Calls hscIncrementalFrontend, and then simplifying,
desugaring, and writing out the interface.
hscIncrementalFrontend
Performs recompilation avoidance, if recompilation needed,
does parses typechecking.
I also cleaned up some of the MergeBoot nonsense by introducing
a FrontendResult type.
NB: this BREAKS #8101 again, because I can't unconditionally desugar
due to Haddock barfing on lint, see #10600
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, bgamari, simonmar, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1302
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We should only use the old linkable when the really is nothing
to be done. In the case of hs-boot, there should just not be
a linkable.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1301
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch drops the file level distinction between hs-boot and hsig;
we figure out which one we are compiling based on whether or not there
is a corresponding hs file lying around.
To make the "import A" syntax continue to work for bare hs-boot
files, we also introduce hs-boot merging, which takes an A.hi-boot
and converts it to an A.hi when there is no A.hs file in scope.
This will be generalized in Backpack to merge multiple A.hi files together;
which means we can jettison the "load multiple interface files" functionality.
This works automatically for --make, but for one-shot compilation
we need a new mode: ghc --merge-requirements A will generate an A.hi/A.o
from a local A.hi-boot file; Backpack will extend this mechanism further.
Has Haddock submodule update to deal with change in msHsFilePath behavior.
- This commit drops support for the hsig extension. Can
we support it? It's annoying because the finder code is
written with the assumption that where there's an hs-boot
file, there's always an hs file too. To support hsig, you'd
have to probe two locations. Easier to just not support it.
- #10333 affects us, modifying an hs-boot still doesn't trigger
recomp.
- See compiler/main/Finder.hs: this diff is very skeevy, but
it seems to work.
- This code cunningly doesn't drop hs-boot files from the
"drop hs-boot files" module graph, if they don't have a
corresponding hs file. I have no idea if this actually is useful.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, austin, bgamari, spinda
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1098
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the GHC side of trac #10568. So `cabal install
--ghc-options="-framework GLUT" GLUT` creates a correctly linked
GLUT.dylib. We still need to explictly pass `--ghc-options="-framework
GLUT"` because the Cabal side #10568 is not fixed.
Update: the Cabal side of #10568 is fixed by
[Cabal#2747](https://github.com/haskell/cabal/pull/2747)
Test Plan: validate
Reviewers: austin, rwbarton, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D1115
GHC Trac Issues: #10568
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With -dynamic-too, .dyn_o files were not being generated for .hsig
files. Normally, this is handled in the pipeline; however, the branch
for .hsig files called compileEmptyStub directly instead of going
through runPipeline. When compiling a Cabal package that included .hsig
files, this triggered a linker error later on, as it expected a .dyn_o
file to have been generated for each .hsig.
The fix is to use runPipeline for .hsig files, just as with .hs files.
Alternately, one could duplicate the logic for handling -dynamic-too in
the .hsig branch, but simply calling runPipeline ends up being much
cleaner.
Test Plan: validate
Reviewers: austin, ezyang, bgamari, thomie
Reviewed By: ezyang, thomie
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1084
GHC Trac Issues: #10660
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since 2223e196b2dc5340d70e58be011c279d381b4319, maybe_old_linkable can
be Nothing even with an up-to-date interface file. This happens when
compiling with --make -fno-code -fwrite-interface.
See also Note [Recompilation checking when typechecking only] in
GhcMake.hs.
This fixes retc001 and retc002 when ghc_debugged.
Differential Revision: https://phabricator.haskell.org/D1077
|
|
|
|
|
|
| |
Also remove 't' and 's' from ALL_WAYS; they don't exist.
Differential Revision: https://phabricator.haskell.org/D1055
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by mitchty:
When porting ghc to alpine linux (rumors say they build
all binaries as Position Independent Executables
to leverage global ASLR) linker issued obscure errors:
Tiny example:
$ echo 'main = print "hello"' > a.hs
$ ghc -fforce-recomp a.hs -fPIC -dynamic -optl-pie -o a
ld: /tmp/ghc2142_0/ghc2142_5.o: relocation R_X86_64_32 against `ZCMain_main_closure'
can not be used when making a shared object; recompile with -fPIC
/tmp/ghc2142_0/ghc2142_5.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
There is two entry points in CC driver:
'runPhase' (CC) and 'mkExtraObj'
'mkExtraObj' does not handle most of 'runPhase's complexity.
Ideally it should.
This patch only adds -fPIC propagation to 'mkExtraObj'.
Please merge to stable branch.
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Depends on D767
Setting this flag prevents RTS from giving RTS suggestions like "Use
`+RTS -Ksize -RTS' to increase it."
According to the comment @rwbarton made in #9579, sometimes "+RTS"
suggestions don't make sense (e.g. when the program is precompiled and
installed through package managers), we can encourage people to
distribute binaries with either "-no-rtsopts-suggestions" or "-rtsopts".
Reviewed By: erikd, austin
Differential Revision: https://phabricator.haskell.org/D809
GHC Trac Issues: #9579
|
|
|
|
|
|
| |
[skip ci]
Differential Revision: https://phabricator.haskell.org/D812
|
|
|
|
|
|
|
|
|
| |
Just do nothing instead. This bug only shows up when using `-x hspp` in
--make mode on registerised builds.
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D776
|
|
|
|
| |
Differential Revision: https://phabricator.haskell.org/D774
|
|
|
|
|
|
| |
Reviewed By: kgardas
Differential Revision: https://phabricator.haskell.org/D763
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
Cpp = Pre-process C
Ccpp = Compile C++
Cobjcpp = Compile Objective-C++
CmmCpp = Pre-process Cmm
Quite confusing! This commit renames `Ccpp` to `Ccplusplus`, and
`Cobjcpp` to `Cobjcplusplus`. The two letters `p-p` keep standing for
`pre-processing` throughout the compiler.
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D756
|
|
|
|
|
|
|
|
|
| |
See Note [Don't normalise input filenames] in
`compiler/main/DriverPipeline.hs`. Fixes #2991.
Reviewers: austin
Differential Revision: https://phabricator.haskell.org/D701
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: It looks like during .lhs -> .hs switch the comments were not updated. So doing exactly that.
Reviewers: austin, jstolarek, hvr, goldfire
Reviewed By: austin, jstolarek
Subscribers: thomie, goldfire
Differential Revision: https://phabricator.haskell.org/D621
GHC Trac Issues: #9986
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Where we track timestamps of object files, also track timestamps
for interface files. When -fno-code -fwrite-interface is enabled, use
the interface file timestamp as an extra check to see if the files are
up-to-date. We had to apply this logic to one-shot and make modes.
This fix would be good to merge into 7.10; it makes using -fno-code
-fwrite-interface for flywheel type checking usable.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate and new test cases
Reviewers: austin
Subscribers: carter, thomie
Differential Revision: https://phabricator.haskell.org/D596
GHC Trac Issues: #9243
|