Drop -fast-llvm
`-fast-llvm` bypasses the mangler. We *could* do this if we had `-fast-llvm` *and* `-fno-plt`; however `-fno-plt` is only supported in the `clang` frontend, and essentially emits `nonlazybind` function attributes. LLVM does not guarantee that all architecture lowering backends respect that attribute and as such this would only work on `x86_64`, and on `aarch64` if passed `-aarch64-enable-nonlazybind`. Arm32 backends don't seem to support this attribute at all.
Fixes #621
commit1e4a554ebe51904708abae45410160c4aeec66ca
authorMoritz Angermann <moritz.angermann@gmail.com>
dateThu 21 May 2020, 12:42 (6 years ago)
parent74915fa
compiler/ghc/default.nix−3
@@ -102,9 +102,6 @@ let
102102 GhcRtsHcOpts += -fPIC
103103 '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
104104 EXTRA_CC_OPTS += -std=gnu99
105− '' + stdenv.lib.optionalString useLLVM ''
106− GhcStage2HcOpts += -fast-llvm
107− GhcLibHcOpts += -fast-llvm
108105 '' + stdenv.lib.optionalString (!enableTerminfo) ''
109106 WITH_TERMINFO=NO
110107 ''