| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that we have -fexternal-interpreter, we can lose most of the GHCI ifdefs.
Reviewers: simonmar, goldfire, austin, hvr, bgamari
Reviewed By: simonmar
Subscribers: RyanGlScott, mpickering, angerman, thomie
Differential Revision: https://phabricator.haskell.org/D2826
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Validate on lots of platforms
Reviewers: erikd, simonmar, austin
Reviewed By: erikd, simonmar
Subscribers: michalt, thomie
Differential Revision: https://phabricator.haskell.org/D2699
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Certain distributions (e.g. Debian and Ubuntu) have enabled PIE be
default in their GCC packaging. This breaks our abuse of GCC as a linker
which requires that we pass -Wl,-r, which is incompatible with
PIE (since the former implies that we are generating a relocatable
object file and the latter an executable).
This is a second attempt at D2691. This attempt constrasts with D2691 in that
it preserves the "does gcc support -no-pie" flag in settings, allowing this to
be reconfigured by `configure` during installation of a binary distribution.
Thanks for @rwbarton for drawing attention to this issue.
Test Plan: Validate
Reviewers: austin, hvr, erikd
Reviewed By: erikd
Subscribers: thomie, rwbarton, erikd
Differential Revision: https://phabricator.haskell.org/D2693
GHC Trac Issues: #12759
|
|
|
|
|
|
| |
This reverts commit bae4a55b1fb403f610b4b55a1b6fb3f03e9c2026.
This will be superceded by D2693.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Certain distributions (e.g. Debian and Ubuntu) have enabled PIE be
default in their GCC packaging. This breaks our abuse of GCC as a linker
which requires that we pass -Wl,-r, which is incompatible with
PIE (since the former implies that we are generating a relocatable
object file and the latter an executable).
Test Plan: Validate
Reviewers: hvr, austin
Subscribers: rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D2691
GHC Trac Issues: #12759
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Build systems / package managers want to be able to control the file
layout of installed libraries. In general they may want/need to be able
to put the static libraries and dynamic libraries in different places.
The ghc-pkg library regisrtation needs to be able to handle this.
This is already possible in principle by listing both a static lib dir
and a dynamic lib dir in the library-dirs field (indeed some previous
versions of Cabal did this for shared libs on ELF platforms).
The downside of listing both dirs is twofold. There is a lack of
precision, if we're not careful with naming then we could end up
picking up the wrong library. The more immediate problem however is
that if we list both directories then both directories get included
into the ELF and Mach-O shared object runtime search paths. On ELF this
merely slows down loading of shared libs (affecting prog startup time).
On the latest OSX versions this provokes a much more serious problem:
that there is a rather low limit on the total size of the section
containing the runtime search path (and lib names and related) and thus
listing any unnecessary directories wastes the limited space.
So the solution in this patch is fairly straightforward: split the
static and dynamic library search paths in the ghc-pkg db and its use
within ghc. This is a traditional solution: pkg-config has the same
static / dynamic split (though it describes in in terms of private and
public, but it translates into different behaviour for static and
dynamic linking).
Indeed it would make perfect sense to also have a static/dynamic split
for the list of the libraries to use i.e. to have dynamic variants of
the hs-libraries and extra-libraries fields. These are not immediately
required so this patch does not add it, but it is a reasonable
direction to follow.
To handle compatibility, if the new dynamic-library-dirs field is not
specified then its value is taken from the library-dirs field.
Contains Cabal submodule update.
Test Plan:
Run ./validate
Get christiaanb and carter to test it on OSX Sierra, in combination
with Cabal/cabal-install changes to the default file layout for
libraries.
Reviewers: carter, austin, hvr, christiaanb, bgamari
Reviewed By: christiaanb, bgamari
Subscribers: ezyang, Phyx, thomie
Differential Revision: https://phabricator.haskell.org/D2611
GHC Trac Issues: #12479
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: validate
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2585
GHC Trac Issues: #12673
|
|
|
|
| |
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
|