Building with ghc-9.2.3-aarch64-apple-darwin
results in a codesigned binary, which breaks my pipelines (ghc-9.2.3-x86_64-apple-darwin
, as all previous versions of GHC, doesn't try to codesign
the binaries after compilation).
Note: running codesign --remove-signature
renders the binary unusable.
Main.hs:
main = putStrLn "most useful program"
The following two commands:
ghc Main.hs
codesign -v -vvv Main
produce
Main: valid on disk
Main: satisfies its Designated Requirement
with ghc-9.2.3-aarch64-apple-darwin
, and
Main: code object is not signed at all
In architecture: x86_64
with ghc-9.2.3-x86_64-apple-darwin
.
Both outputs to be code object is not signed at all
.
GHC versions used: ghc-9.2.3-aarch64-apple-darwin
, and ghc-9.2.3-x86_64-apple-darwin
, both downloaded from https://downloads.haskell.org
Operating System: macOS 11.4 Big Sur
System Architecture: aarch64
, and x86_64
I can't reproduce the above-mentioned behaviour. In both cases, adding {-# INLINE foo #-}
trims one of the branches for me (with ghc-9.0.2 on macOS).
I found this issue coming from the same assumption, that if System.Info.os == ..
would cause the unnecessary cases to get optimised away, so can we at least add INLINE to the strings in System.Info?
I would make a Merge request, if such a change will be accepted.