| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Previously `hadrian` would pass `-optc-Werror=unused-but-set-variable`
to all GHC invocations. This was a difference from the make build system
and cause the unregisterised build to fail as the C that GHC produces
contains many unused functions. Drop it from the GHC flags.
Note, however, that the flag is still present in
`Settings.Builders.Common.cWarnings` and therefore will still be applied
during compilation of C sources.
|
|
|
|
|
| |
Some of these flags wanted to be passed to .cmm builds as well as C
builds.
|
|
|
|
|
|
|
|
| |
It seems that NOSMP was previously only defined when compiling the
compiler, not the RTS. Fix this.
In addition do some spring-cleaning and make the logic match that of the
Make build system.
|
| |
|
|
|
|
|
|
|
| |
Previously we would allow the output from the check of SMP support
introduced by 83655b06e6d3e93b2d15bb0fa250fbb113d7fe68 leak to
stdout. Silence this.
See #16873.
|
|
|
|
| |
It should point to the _build directory, not the source
|
| |
|
|
|
|
| |
[skip ci]
|
|
|
|
|
|
|
|
|
| |
This commit makes Hadrian use the `-dynamic-too` flag when the current
Flavour's libraryWays contains both vanilla and dynamic, cutting down
the amount of repeated work caused by separate compilation of dynamic
and static files. It does this for the basic case where '.o' and
'.dyn_o' files are built with one command, but does not generalise to
cases like '.prof_o' and '.prof_dyn_o'.
|
|
|
|
| |
See #16873.
|
|
|
|
|
|
|
|
| |
cmd uses RawCommand which uses Windows semantics to find the executable
which sometimes seems to fail for unclear reasons.
If we invoke ghc via bash then bash will find the ghc executable and
the issue goes away.
|
|
|
|
|
|
| |
This patch adds support for the s390x architecture for the LLVM code
generator. The patch includes a register mapping of STG registers onto
s390x machine registers which enables a registerised build.
|
|
|
|
| |
Also refactor things a bit to eliminate repetition.
|
|
|
|
| |
Fixes #17351.
|
|
|
|
|
| |
This is a very cheap job and can catch a number of "easy" failure modes
(e.g. missing imports in the compiler). Let's run it first.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- No need to distinguish between gcc-llvm and clang. First of all,
gcc-llvm is quite old and surely unmaintained by now. Second of all,
none of the code actually care about that distinction!
Now, it does make sense to consider C multiple frontends for LLVMs in
the form of clang vs clang-cl (same clang, yes, but tweaked
interface). But this is better handled in terms of "gccish vs
mvscish" and "is LLVM", yielding 4 combinations. Therefore, I don't
think it is useful saving the existing code for that.
- Get the remaining CC_LLVM_BACKEND, and also TABLES_NEXT_TO_CODE in
mk/config.h the normal way, rather than hacking it post-hoc. No point
keeping these special cases around for now reason.
- Get rid of hand-rolled `die` function and just use `AC_MSG_ERROR`.
- Abstract check + flag override for unregisterised and tables next to
code.
Oh, and as part of the above I also renamed/combined some variables
where it felt appropriate.
- GccIsClang -> CcLlvmBackend. This is for `AC_SUBST`, like the other
Camal case ones. It was never about gcc-llvm, or Apple's renamed clang,
to be clear.
- llvm_CC_FLAVOR -> CC_LLVM_BACKEND. This is for `AC_DEFINE`, like the
other all-caps snake case ones. llvm_CC_FLAVOR was just silly
indirection *and* an odd name to boot.
|
|
|
|
| |
Fixes #17286.
|
| |
|
|
|
|
| |
To avoid polluting the macro namespace
|
|
|
|
|
|
|
| |
This ensures that all GHC flags are documented during the documentation
build.
Fixes #17315.
|
|
|
|
| |
This ensure that it blurts an error on missing references.
|
| |
|
| |
|
|
|
|
|
|
| |
You can always just not use or even build `iserv`. I don't think the
maintenance cost of the CPP is worth...I can't even tell what the
benefit is.
|
| |
|
|
|
|
| |
They are only used in a file we construct directly, so just skip CPP.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The generated headers are now generated per stage, which means we can
skip hacks like `ghc_boot_platform.h` and just have that be the stage 0
header as proper. In general, stages are to be embraced: freely generate
everything in each stage but then just build what you depend on, and
everything is symmetrical and efficient. Trying to avoid stages because
bootstrapping is a mind bender just creates tons of bespoke
mini-mind-benders that add up to something far crazier.
Hadrian was pretty close to this "stage-major" approach already, and so
was fairly easy to fix. Make needed more work, however: it did know
about stages so at least there was a scaffold, but few packages except
for the compiler cared, and the compiler used its own counting system.
That said, make and Hadrian now work more similarly, which is good for
the transition to Hadrian. The merits of embracing stage aside, the
change may be worthy for easing that transition alone.
|
|
|
|
|
|
|
| |
This modifies both the Hadrian and make build systems to avoid included
the rts.cabal generated by autoconf in the source distribution.
Fixes #17265.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds three new files
1. A hie.yaml file to the project root which specifies to IDEs how to
set up the correct environment for loading GHC. This currently
specifies to call the `./hadrian/hie-bios` script.
2. A `hie.yaml` file for the hadrian subcomponent, which uses the
`cabal` cradle type.
2. The `./hadrian/hie-bios` script which supplies the correct arguments
for an IDE to start a session.
With these two files it is possible to run
```
ghcide compiler/
```
and successfully load all the modules for use in the IDE.
or
```
ghcide --cwd hadrian/ src/
```
to test loading all of Hadrian's modules.
Closes #17194
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds -haddock option to Hadrian-based build system.
To enable :doc command on GHCi, core libraries must be compiled
with -haddock option.
Especially, the `-haddock` option is essential for a release build.
Assuming current GitLab CI condition (.gitlab-ci.yml),
I add -haddock option to the default flavour only.
This has already been done for Make-based build system.
Please see #16415.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, if you change these ^ flavour parameters, rebuilding is not
triggered, since `programContext` doesn't set up a dependency on
those values.
Exposing these values via an oracle does set the dependency and
properly triggers a rebuild of binaries.
Several attempts to factor out these actions ended up in cyclic
dependency here or there. I'm not absolutely happy with this variant
either, but at least it works.
====
Issue repro:
In UserSettings.hs:
```
dbgDynamic = defaultFlavour { name = "dbg-dynamic"
, dynamicGhcPrograms = pure True,
... }
dbgStatic = defaultFlavour { name = "dbg-static"
, dynamicGhcPrograms = pure False
... }
```
Then in console:
```
$ hadrian/build.sh -j --flavour=dbg-dynamic
... does the build
$ hadrian/build.sh -j --flavour=dbg-static
... does nothing, considers binaries up to date
```
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Turns out some genius disabled warnings for RetainerProfile.c in the build
system. That would have been good to know about five silent type mismatch
crashes ago.. :)
|
| |
|
| |
|
|
|
|
| |
Broken by 2b37a79d61e9b3787873dc9f7458ef2bde4809b0
|
|
|
|
|
| |
07ee15915d5a0d6d1aeee137541eec6e9c153e65 started the transition, but the
job was never finished.
|
|
|
|
|
|
|
|
| |
-------------------------
Metric Increase:
haddock.Cabal
T4029
-------------------------
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Some where using `True` / `False`, a legacy of when they were in
`Config.hs`. See #16914 / d238d3062a9858 for a similar problem.
Also clean up the configure variables names for consistency and clarity
while we're at it. "Target" makes clear we are talking about outputted
code, not where GHC itself runs.
|
|
|
|
| |
Define MD5Context in terms of `uint*_t` and don't use `HsFFI.h`.
|
|
|
|
|
| |
This commit adds documentation on Hadrian's 'Expr' type and
references the documentation in hadrian/README.md
|