| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a `-fenable-ide-info` flag which instructs GHC to generate `.hie`
files (see the wiki page:
https://ghc.haskell.org/trac/ghc/wiki/HIEFiles).
This is a rebased version of Zubin Duggal's (@wz1000) GHC changes for
his GSOC project, as posted here:
https://gist.github.com/wz1000/5ed4ddd0d3e96d6bc75e095cef95363d.
Test Plan: ./validate
Reviewers: bgamari, gershomb, nomeata, alanz, sjakobi
Reviewed By: alanz, sjakobi
Subscribers: alanz, hvr, sjakobi, rwbarton, wz1000, carter
Differential Revision: https://phabricator.haskell.org/D5239
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Do full build on Windows.
Reviewers: AndreasK, Phyx
Reviewed By: AndreasK
Subscribers: rwbarton, erikd, carter
GHC Trac Issues: #15934
Differential Revision: https://phabricator.haskell.org/D5383
|
|
|
|
|
|
|
|
| |
This reverts commit 1cc9061fce4270739677d475190fd6e890e8b1f9.
This appears to break a clean build with certain versions of
`ld.gold`. See
https://phabricator.haskell.org/rGHC1cc9061fce42#132967.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: `make test=T10869`
Reviewers: mpickering, thomie, ezyang, bgamari
Reviewed By: thomie, bgamari
Subscribers: rwbarton, carter
GHC Trac Issues: #10869
Differential Revision: https://phabricator.haskell.org/D4861
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In https://github.com/gentoo-haskell/gentoo-haskell/issues/704
user explicitly uses -Wl,--relax for most built binaries.
Most of the time this works fine except for capi haskell code
similar to the following:
```haskell
{-# LANGUAGE CApiFFI #-}
module Z where
import Foreign.C
foreign import capi "unistd.h close" c_close :: CInt -> IO CInt
```
In this case compilation fails as:
```
$ inplace/bin/ghc-stage2 -c Z.hs -optl-Wl,--relax -fforce-recomp
ld: --relax and -r may not be used together
```
GHC's driver already disables relaxation on sparc as there relaxation
is already a default mode.
This change disables relaxation on partial linking for all platforms
where linker is binutils linker.
Reported-by: wmyrda
Bug: https://github.com/gentoo-haskell/gentoo-haskell/issues/704
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Test Plan: pass -optl-Wl,--relax in test above
Reviewers: bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4888
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
All these were detected by -fghci-leak-check when GHC was
compiled *without* optimisation (e.g. using the "quick" build flavour).
Unfortunately I don't know of a good way to keep this working. I'd like
to just disable the -fghci-leak-check flag when the compiler is built
without optimisation, but it doesn't look like we have an easy way to do
that. And even if we could, it would be fragile anyway,
Test Plan: `cd testsuite/tests/ghci; make`
Reviewers: bgamari, hvr, erikd, tdammers
Subscribers: tdammers, rwbarton, thomie, carter
GHC Trac Issues: #15246
Differential Revision: https://phabricator.haskell.org/D4872
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When GHC links binaries on windows, we pass a -L and -l flag
to gcc for each dependency in the transitive dependency
closure. As this will usually overflow the command argument
limit on windows, we use response files to pass all arguments
to gcc. gcc however internally passes only the -l flags via
a response file to the collect2 command, but puts the -L flags
on the command line. As such if we pass enough -L flags to
gcc--even via a response file--we will eventually overflow the
command line argument length limit due to gcc passing them
to collect2 without resorting to a response file.
To prevent this from happening we move all lirbaries into a
shared temporary folder, and only need to pass a single -L
flag to gcc. Ideally however this was fixed in gcc.
Reviewers: bgamari, Phyx
Reviewed By: bgamari
Subscribers: erikd, rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4762
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When linking dynamic libraries or executables, we compute the full
transitive closure over the dependencies, and instruct the linker
to link all dependencies. With deep dependency trees the number
of transitive dependencies can grow quickly.
macOS since the Sierra release has an upper limit on the load
command sizes the linker parses when loading dynamic lirbaries.
As such it is mandatory to keep the number of load commands (and
their size) small on recent macOS releases.
An approach that would just link direct dependencies as specified
by the -package-id flag is insufficient, because GHC can inline
across packages and the library or executable being linked could
refer to symbols deep in the dependency tree.
If we just recursively linked librarys and re-exported their
symbols, this increases the number of symbols in libraries with
many dependencies and ultimately puts excessive strain on the
linker to the point where linking takes a lot longer than even
the compilation of the modules.
We can however build a list of symbols from the obejcts we want
to link, and try to compute the libraries we need to link that
contain those symbols from the transitive dependency closure.
Luckily, we don't need to write this ourselves, but can use
the ld64 `-dead_strip_dylibs` linker flag on macOS to achive
the same result. This will link only the libraries that are
actually referenced, which is usually a small subset of the
full transitive dependency closure. As such we should stay
within the load command size limit for almost all but pathological
cases.
Reviewers: bgamari
Reviewed By: bgamari
Subscribers: lelf, rwbarton, thomie, carter
GHC Trac Issues: #14444
Differential Revision: https://phabricator.haskell.org/D4714
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To resolve ticket #11295, I think it makes sense to stop hard-coding
the pass sequences used by GHC when compiling with LLVM into the
compiler
itself.
This patchset introduces a companion to the existing `llvm-targets` file
called `llvm-passes`. The passes file is a simple association list that
holds the default LLVM `opt` pass sequence used by GHC. This allows end
users to easily save their favorite optimization flags when compiling
with LLVM.
The main benefit for ticket #11295 is that when adding a custom pass
sequence, it tends to be an extremely long string that would be
unsightly in the code.
This is essentially part 1 of 2 for ticket #11295.
Test Plan: ./validate
Reviewers: bgamari, angerman
Reviewed By: angerman
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4695
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch takes the much simpler route of whenever the compiler tries
to output something. We just dump a JSON document there and then.
I think this should be sufficient to work with and anything more refined
quickly got complicated as it was necessary to demarcate message scopes
and so on.
Reviewers: bgamari, dfeuer
Reviewed By: bgamari
Subscribers: Phyx, dfeuer, rwbarton, thomie, carter
GHC Trac Issues: #14078
Differential Revision: https://phabricator.haskell.org/D4532
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: bgamari
Subscribers: thomie, carter
GHC Trac Issues: #14982
Differential Revision: https://phabricator.haskell.org/D4548
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The user facing TH interface changes are:
* 'addForeignFile' is renamed to 'addForeignSource'
* 'qAddForeignFile'/'addForeignFile' now expect 'FilePath's
* 'RawObject' is now a constructor for 'ForeignSrcLang'
* 'qAddTempFile'/'addTempFile' let you request a temporary file
from the compiler.
Test Plan: unsure about this, added a TH test
Reviewers: goldfire, bgamari, angerman
Reviewed By: bgamari, angerman
Subscribers: hsyl20, mboes, carter, simonmar, bitonic, ljli, rwbarton, thomie
GHC Trac Issues: #14298
Differential Revision: https://phabricator.haskell.org/D4217
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GHC Used to only allow for one include mode, namely `-I`. The problem
with `-I` includes is that it supercedes all other includes, including
the system include paths.
This is not a problem for paths requested by the user, but it is a
problem for the ones we implicitly derive and add.
In particular we add the source directory of the input file to the
include path. This is problematic because it causes any file with the
name of a system include, to inadvertently loop as the wrong file gets
included.
Since this is an implicitly include, and as far as I can tell, only done
so local includes are found (as the sources given to GCC reside in a
temp folder) then switch from `-I` to `-iquote`.
This requires a submodule update for haddock
Test Plan: ./validate
Reviewers: austin, bgamari, hvr
Reviewed By: bgamari
Subscribers: carter, rwbarton, thomie
GHC Trac Issues: #14312
Differential Revision: https://phabricator.haskell.org/D4080
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds support for the bit deposit and extraction operations provided
by the BMI and BMI2 instruction set extensions on modern amd64 machines.
Implement x86 code generator for pdep and pext. Properly initialise
bmiVersion field.
pdep and pext test cases
Fix pattern match for pdep and pext instructions
Fix build of pdep and pext code for 32-bit architectures
Test Plan: Validate
Reviewers: austin, simonmar, bgamari, angerman
Reviewed By: bgamari
Subscribers: trommler, carter, angerman, thomie, rwbarton, newhoggy
GHC Trac Issues: #14206
Differential Revision: https://phabricator.haskell.org/D4236
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D4210
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
When building the rts with ghc (e.g. using ghc as a c compiler), ghc's
"Value Add"[1] is, it includes adding `-include /path/to/ghcversion.h`. For
this it looksup the rts package in the package database, which--if
empty--fails. Thus to allow compiling C files with GHC, we add the
`-ghc-version` flag, which takes the path to the `ghcversion.h` file.
A `-no-ghc-version` flag was omitted, as at that point it becomes
questionable why one would use ghc to compile c if one doesn't
any of the added value.
--
[1] from `compiler/main/DriverPipeline.hs`
> -- add package include paths even if we're just compiling .c
> -- files; this is the Value Add(TM) that using ghc instead of
> -- gcc gives you :)
Reviewers: bgamari, geekosaur, austin
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D4135
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
SysTools and DriverTools have an annoying mutual dependency.
They also each contain pieces of the linker. In order for
changes to be shared between the library and the exe linking
code this dependency needs to be broken in order to avoid
using hs-boot files.
Reviewers: austin, bgamari, erikd
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D4071
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This switches the compiler/ component to get compiled with
-XNoImplicitPrelude and a `import GhcPrelude` is inserted in all
modules.
This is motivated by the upcoming "Prelude" re-export of
`Semigroup((<>))` which would cause lots of name clashes in every
modulewhich imports also `Outputable`
Reviewers: austin, goldfire, bgamari, alanz, simonmar
Reviewed By: bgamari
Subscribers: goldfire, rwbarton, thomie, mpickering, bgamari
Differential Revision: https://phabricator.haskell.org/D3989
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hopefully we can get rid of libtool, by using ar only
Depends on: D3579
Test Plan: validate
Reviewers: austin, hvr, bgamari, erikd
Reviewed By: bgamari
Subscribers: rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D3721
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As far as GHC is concerned, iOS **is** Darwin, and
Android **is** Linux.
Depends on D3352
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: Ericson2314, ryantrinkle, rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D3579
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The LLVM backend shells out to LLVMs `opt` and `llc` tools. This clean
up introduces a shared data structure to carry the arguments we pass to
each tool so that corresponding flags are next to each other. It drops
the hard coded data layouts in favor of using `-mtriple` and have LLVM
infer them. Furthermore we add `clang` as a proper tool, so we don't
rely on assuming that `clang` is called `clang` on the `PATH` when using
`clang` as the assembler. Finally this diff also changes the type of
`optLevel` from `Int` to `Word`, as we do not have negative optimization
levels.
Reviewers: erikd, hvr, austin, rwbarton, bgamari, kavon
Reviewed By: kavon
Subscribers: michalt, Ericson2314, ryantrinkle, dfeuer, carter, simonpj,
kavon, simonmar, thomie, erikd, snowleopard
Differential Revision: https://phabricator.haskell.org/D3352
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously due to #12759 we disabled PIE support entirely. However, this
breaks the user's ability to produce PIEs. Add an explicit flag, -fPIE,
allowing the user to build PIEs.
Test Plan: Validate
Reviewers: rwbarton, austin, simonmar
Subscribers: trommler, simonmar, trofi, jrtc27, thomie
GHC Trac Issues: #12759, #13702
Differential Revision: https://phabricator.haskell.org/D3589
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ld.gold is particularly picky that we declare all of our link
dependencies on Nix. See #14022.
Test Plan: Validate on Nix
Reviewers: austin
Subscribers: hvr, rwbarton, thomie
GHC Trac Issues: #14022
Differential Revision: https://phabricator.haskell.org/D3787
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When loading/reloading with a large number of modules
(>5000) the cost of linear lookups becomes significant.
The changes here made `:reload` go from 6s to 1s on my
test case.
The bottlenecks were `needsLinker` in `DriverPipeline` and
`getModLoop` in `GhcMake`.
Test Plan: ./validate
Reviewers: simonmar, austin, bgamari
Subscribers: thomie, rwbarton
Differential Revision: https://phabricator.haskell.org/D3703
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously GHC would always assume that section types began with `@` while
producing assembly, which is not true. For instance, in ARM assembly syntax
section types begin with `%`. This abstracts out section type pretty-printing
and adjusts it to correctly account for the target architectures assembly
flavor.
Reviewers: austin, hvr, Phyx
Reviewed By: Phyx
Subscribers: Phyx, rwbarton, thomie, erikd
GHC Trac Issues: #13937
Differential Revision: https://phabricator.haskell.org/D3712
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the `-staticlib` flag is currently only supported on apple platforms,
due to the avaiablity of libtool (the apple version, which is unlike the
gnu version). This however prevents the use of -staticlib in cases
where it would be beneficial as well. The functionality that
`-staticlib` uses from `libtool` can be stubbed with a small script like
the following:
```
#!/bin/bash
# This script pretends to be libtool. And supports
# only a limited set of flags.
#
# It is supposed to be a stand in for libtool -static, whic
# creates a static archive. This is done by locating all -l<lib>
# libs in the provied -L<lib path> library paths, and building an
# MRI script to create the final archive from all the libraries, and
# other provided inputs.
#
name=${0##*/}
target=${name%-*}
set -e
ldflags_L=()
ldflags_l=()
output=""
inputs=()
STATIC=0
DYNAMIC=1
mode=$DYNAMIC
verbose=0
# find_lib <name> path path path path
function find_lib () {
lib=$1; shift 1;
for dir in $@; do
if [ -f "$dir/$lib" ]; then
echo "$dir/$lib"
break
fi
done
}
while [ "$#" -gt 0 ]; do
case "$1" in
-v|--verbose) verbose=1; shift 1;;
-o) output="$2"; shift 2;;
-L*) ldflags_L+=("${1:2:${#1}-2}"); shift 1;;
-l*) ldflags_l+=("lib${1:2:${#1}-2}.a"); shift 1;;
-static) mode=$STATIC; shift 1;;
-dynamic) mode=$DYNAMIC; shift 1;;
-Wl,*) ldflags+=("${1#*,}"); shift 1;;
-*) echo "unknown option: $1" >&2; exit 1;;
*) inputs+=("$1"); shift 1;;
esac
done
if [ ! $mode == $STATIC ]; then
echo "-dynamic not supported!" >&2; exit 1;
fi
MRI="create ${output}\n"
for input in "${ldflags_l[@]}"; do
lib=$(find_lib $input ${ldflags_L[@]})
if [ -z $lib ]; then
echo "Failed to find lib $input" >&2
exit 1
else
MRI+="addlib $lib\n"
continue
fi
done
for input in "${inputs[@]}"; do
MRI+="addmod $input\n"
done
MRI+="save\nend\n"
echo -e "$MRI" | $target-ar -M
$target-ranlib $output
```
if `ar` supports MRI scripts.
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3706
|
|
|
|
|
|
| |
I had not intended on merging this.
This reverts commit b0708588e87554899c2efc80a2d3eba353dbe926.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When loading/reloading with a large number of modules
(>5000) the cost of linear lookups becomes significant.
The changes here made `:reload` go from 6s to 1s on my
test case.
The bottlenecks were `needsLinker` in `DriverPipeline` and
`getModLoop` in `GhcMake`.
Test Plan: ./validate
Reviewers: simonmar, austin, bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3646
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove filesToNotIntermediateClean from DynFlags, create a data type
FilesToClean, and change filesToClean in DynFlags to be a FilesToClean.
Modify SysTools.newTempName and the Temporary constructor of
PipelineMonad.PipelineOutput to take a TempFileLifetime, which specifies
whether a temp file should live until the end of GhcMonad.withSession,
or until the next time cleanIntermediateTempFiles is called.
These changes allow the cleaning of intermediate files in GhcMake to be
much more efficient.
HscTypes.hptObjs is removed as it is no longer used.
A new performance test T13701 is added, which passes both with and
without -keep-tmp-files. The test fails by 25% without the patch, and
passes when -keep-tmp-files is added.
Note that there are still at two hotspots caused by
algorithms quadratic in the number of modules, however neither of them
allocate. They are:
* DriverPipeline.compileOne'.needsLinker
* GhcMake.getModLoop
DriverPipeline.compileOne'.needsLinker is changed slightly to improve
the situation.
I don't like adding these Types to DynFlags, but they need to be seen by
Dynflags, SysTools and PipelineMonad. The alternative seems to be to
create a new module.
Reviewers: austin, hvr, bgamari, dfeuer, niteria, simonmar, erikd
Reviewed By: simonmar
Subscribers: rwbarton, thomie
GHC Trac Issues: #13701
Differential Revision: https://phabricator.haskell.org/D3620
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch relates to Trac #8025
The goal here is to enable typechecking of packages that contain some
template haskell. Prior to this patch, compilation of a package with
-fno-code would fail if any functions in the package were called from
within a splice.
downsweep is changed to do an additional pass over the modules,
targetting any ModSummaries transitively depended on by a module that
has LangExt.TemplateHaskell enabled. Those targeted modules have
hscTarget changed from HscNothing to the default target of the platform.
There is a small change to the prevailing_target logic to enable this.
A simple test is added.
I have benchmarked with and without a patched haddock
(available:https://github.com/duog/haddock/tree/wip-no-explicit-th-compi
lation). Running cabal haddock on the wreq package results in a 25%
speedup on my machine:
time output from patched cabal haddock:
real 0m5.780s
user 0m5.304s
sys 0m0.496s
time output from unpatched cabal haddock:
real 0m7.712s
user 0m6.888s
sys 0m0.736s
Reviewers: austin, bgamari, ezyang
Reviewed By: bgamari
Subscribers: bgamari, DanielG, rwbarton, thomie
GHC Trac Issues: #8025
Differential Revision: https://phabricator.haskell.org/D3441
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
we do the same for the rts already. And using the configure script should
be more robust than hand-picking the OSs here.
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3563
|
|
|
|
| |
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
iOS at least since iOS8 (we are currently at iOS10.3), allows for
dynamic libaries, hence any artificail restriction on dyanmic
libraries should be lifted.
Please ping me with any iOS related issues that should potentially
resurface. The iOS toolchain has considerably changed over the
years, and I'm willing to drop work arounds in good faith.
Reviewers: bgamari, austin
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #13559, #7722
Differential Revision: https://phabricator.haskell.org/D3451
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* If the package flags haven't changed, don't do initPackages (which
might take multiple seconds in extreme cases)
* Provide a way to change the log_action without invalidating the
summary cache.
Test Plan: validate
Reviewers: niteria, bgamari, austin, erikd, ezyang
Reviewed By: bgamari
Subscribers: mpickering, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3392
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Better test for SHT_INIT_ARRAY than openbsd_HOST_OS
This is actually bens patch:
https://gist.github.com/bgamari/c846e6a5f2cd988716cd5e36c68d5bef
- linux-android defines.
- No need for -lpthread on OSAndroid
However, I’m confused why we do not use the AC NEED_PTHREAD_LIB
value here?
- Use mmap on android
- Support `none` vendor.
Reviewers: austin, hvr, bgamari, erikd, simonmar
Reviewed By: bgamari
Subscribers: rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D3356
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This factors out the repetition of (log_action dflags dflags) and will
hopefully allow us to someday better abstract log output.
Test Plan: Validate
Reviewers: austin, hvr, goldfire
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3334
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main goal is to easily allow the inline-c project (and
similar projects such as inline-java) to emit C/C++ files to
be compiled and linked with the current module.
Moreover, `addCStub` is removed, since it's quite fragile. Most
notably, the C stubs end up in the file generated by
`CodeOutput.outputForeignStubs`, which is tuned towards
generating a file for stubs coming from `capi` and Haskell-to-C
exports.
Reviewers: simonmar, austin, goldfire, facundominguez, dfeuer, bgamari
Reviewed By: dfeuer, bgamari
Subscribers: snowleopard, rwbarton, dfeuer, thomie, duncan, mboes
Differential Revision: https://phabricator.haskell.org/D3280
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We're building a demo to show how to hot-swap Haskell code in a
running process, and unfortunately it wasn't possible to convince GHC
to generate the correct linker command line without this extra knob.
Test Plan:
Tested it on a hot-swapping demo (which is not released yet, but will
be shortly)
Reviewers: niteria, austin, erikd, JonCoens, bgamari
Reviewed By: bgamari
Subscribers: Phyx, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3136
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Detect Backpackish suffixes, and bail out if we try
to run them in the pipeline.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: rwbarton, bgamari, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D3172
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch converts the 4 lasting static flags (read from the command
line and unsafely stored in immutable global variables) into dynamic
flags. Most use cases have been converted into reading them from a DynFlags.
In cases for which we don't have easy access to a DynFlags, we read from
'unsafeGlobalDynFlags' that is set at the beginning of each 'runGhc'.
It's not perfect (not thread-safe) but it is still better as we can
set/unset these 4 flags before each run when using GHC API.
Updates haddock submodule.
Rebased and finished by: bgamari
Test Plan: validate
Reviewers: goldfire, erikd, hvr, austin, simonmar, bgamari
Reviewed By: simonmar
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2839
GHC Trac Issues: #8440
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Here we add support to GHCi for StaticPointers. This process begins by
adding remote GHCi messages for adding entries to the static pointer
table. We then collect binders needing SPT entries after linking and
send the interpreter a message adding entries with the appropriate
fingerprints.
Test Plan: `make test TEST=StaticPtr`
Reviewers: facundominguez, mboes, simonpj, simonmar, goldfire, austin,
hvr, erikd
Reviewed By: simonpj, simonmar
Subscribers: RyanGlScott, simonpj, thomie
Differential Revision: https://phabricator.haskell.org/D2504
GHC Trac Issues: #12356
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently we use `-Wl` which takes a list of
comma-separated options. Unfortunately that
breaks when you use it with `-rpath` and
a path that has commas in them.
Buck, the build system, produces paths with
commas in them.
`-Xlinker` doesn't have this disadvantage
and as far as I can tell is supported by
both `gcc` and `clang`. Anecdotally `nvcc`
supports `-Xlinker`, but not `-Wl`.
Test Plan: ./validate, harbourmaster
Reviewers: nomeata, simonmar, austin, bgamari, hvr
Reviewed By: simonmar, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2971
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: GHC CI
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2915
GHC Trac Issues: #11040, #13049
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This enables subsections-via-symbols (-dead_strip) by default on Darwin.
The Static Reference Table (SRT) needs to be split in order for
-dead_strip to be helpful, so this commit always splits it on Darwin
systems.
Test Plan: GHC CI on Darwin
Reviewers: erikd, austin, bgamari
Reviewed By: erikd, bgamari
Subscribers: erikd, thomie
Differential Revision: https://phabricator.haskell.org/D2911
GHC Trac Issues: #11040, #13049
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Now that we have -fexternal-interpreter, we can lose most of the GHCI ifdefs.
This was originally added in https://phabricator.haskell.org/D2826
but that led to a compatibility issue with ghc 7.10.x on Windows.
That's fixed here and the revert reverted.
Reviewers: goldfire, hvr, austin, bgamari, Phyx
Reviewed By: Phyx
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2884
GHC Trac Issues: #13008
|
|
|
|
| |
This reverts commit 52ba9470a7e85d025dc84a6789aa809cdd68b566.
|