-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow cross-compilation with Hadrian #844
Conversation
Yeah, that might be a regression that needs to be fixed. |
@hasufell #845 fixes the installation! Two notes:
So we have to use |
Does If so, then |
No, they are qualified:
Using |
I found it useful to produce a bindist always and put it into cache dir, in case you want to reinstall for whatever reason. We could have a cli switch to skip it or so. |
It's quite a corner case, so let's not do it until there is more demand. Could you help me with CI? It seems to choke on the empty host name provided by:
|
@@ -1015,8 +1015,6 @@ compileGHC targetGhc ov bstrap jobs mbuildConfig patches aargs buildFlavour hadr | |||
m | |||
(Maybe FilePath) -- ^ output path of bindist, None for cross | |||
compileHadrianBindist tver workdir ghcdir = do | |||
lEM $ execWithGhcEnv "python3" ["./boot"] (Just workdir) "ghc-bootstrap" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure about this? We support compiling for old GHCs as well, both from git and from the src tarball. Do none of them need the boot?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From git we would have to ./boot
. But apparently compileMakeBindist
doesn't do this, so I've removed it. Perhaps we should check for the existence of ./boot
before running it (in the source dist it seems to be called boot.source
; I don't know why it's even bundled).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, maybe checking for existence makes sense.
9bfa85b
to
4361ef7
Compare
Am pushing some commits to your branch. |
I managed to compile and install: Compile:
Installing from bindist:
Setting as default:
Then created the hello world according to https://gitlab.haskell.org/ghc/ghc/-/wikis/javascript-backend/building#compiling-hello-world and:
Boom 💥 The problems/remarks at the moment are:
|
Right x -> pure x | ||
Left e -> fail $ "Failure in GHCTargetVersion (FromJSON)" <> show e | ||
|
||
instance ToJSONKey GHCTargetVersion where |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to test whether that actually works in ghcup-metadata file
Good work!
You don't need this. There is already a flag to specify the flavour and we can use it like this:
|
48483d0
to
6483ec5
Compare
6483ec5
to
0da5572
Compare
Last CI failure is a "No space left on device" |
Yes, I've been poking @angerman about it |
I think we can make a pre-release and build some more bindists manually |
Try to fix cross-compilation with Hadrian for the JS backend (cf #838).
Currently failing with:
Shouldn't dbs be distinguished for cross-compilers?