Skip to content

Adds ghcjs and Asterius as cross compilers #106

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

Merged
merged 6 commits into from
May 16, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions builder/comp-builder.nix
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,14 @@ let
"--with-ghc=${ghc.targetPrefix}ghc"
"--with-ghc-pkg=${ghc.targetPrefix}ghc-pkg"
"--with-hsc2hs=${ghc.targetPrefix}hsc2hs"
# CC
] ++ lib.optionals (!stdenv.targetPlatform.isGhcjs)
[ # CC
"--with-gcc=${stdenv.cc.targetPrefix}cc"
# BINTOOLS
"--with-ld=${stdenv.cc.bintools.targetPrefix}ld"
"--with-ar=${stdenv.cc.bintools.targetPrefix}ar"
"--with-strip=${stdenv.cc.bintools.targetPrefix}strip"
# other flags
] ++ [ # other flags
"--enable-executable-stripping"
"--enable-library-stripping"
] ++ lib.optional doHaddock' "--docdir=${docdir "$doc"}"
Expand Down
3 changes: 2 additions & 1 deletion lib/host-map.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ stdenv: with stdenv.hostPlatform; {
if isFreeBSD then "Freebsd" else
if isOpenBSD then "Openbsd" else
if isNetBSD then "Netbsd" else
if isHurd then "Hurd" else
if isiOS then "Ios" else
if isAndroid then "Android" else
if isGhcjs then "Ghcjs" else
throw "Unknown OS";
arch = if isx86 && is32bit then "I386" else
if isx86 && is64bit then "X86_64" else
Expand All @@ -16,5 +16,6 @@ stdenv: with stdenv.hostPlatform; {
if isAarch32 then "Arm" else
if isAarch64 then "Aarch64" else
if isMips then "Mips" else
if isJavaScript then "JavaScript" else
throw "Unknown Arch";
}