Skip to content

Commit a2612aa

Browse files
committed
Use +dynamic-system-linker for aarch64 -> aarch64 musl
1 parent 5661558 commit a2612aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/ghc/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,8 @@ let
323323
" '*.*.ghc.*.opts += -fexternal-dynamic-refs'"
324324
# The fact that we need to set this here is pretty idiotic. GHC should figure this out on it's own.
325325
# Either have a runtime flag/setting to disable it or if dlopen fails, remember that it failed and
326-
# fall back to non-dynamic. We only have x86_64 dynamic linker with musl.
327-
+ lib.optionalString (targetPlatform.isAndroid || (targetPlatform.isMusl && !targetPlatform.isx86))
326+
# fall back to non-dynamic. We only have dynamic linker with musl if host and target arch match.
327+
+ lib.optionalString (targetPlatform.isAndroid || (targetPlatform.isMusl && haskell-nix.haskellLib.isCrossTarget))
328328
" '*.ghc.cabal.configure.opts += --flags=-dynamic-system-linker'"
329329
# The following is required if we build on aarch64-darwin for aarch64-iOS. Otherwise older
330330
# iPhones/iPads/... won't understand the compiled code, as the compiler will emit LDSETALH

0 commit comments

Comments
 (0)