Opened 19 months ago

Last modified 12 months ago

#8629 new bug

Option 'split-objs' being ignored when trying to reduce object code size in iOS cross-compilation

Reported by: f1rstmistake Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.6.3
Keywords: ios Cc:
Operating System: MacOS X Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: #8300 Blocking:
Related Tickets: Differential Revisions:

Description

I have been trying to statically link Pandoc packages to iOS application following the guide in https://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling/iOS and it's great so far! I have finally successfully use Pandoc library in iOS app, but the binary size is very big!

  1. More than 50MB when using Pandoc library.
  2. Around 5MB for simple haskell code.

I try to add “split-objs: True” in .cabal/config file, but when running cabal I got this message:

Preprocessing library pandoc-1.12.2.1...
unused terminals: 1

on the commandline: Warning: ignoring -fsplit-objs

And if I ignore that, at the end of build, I get another error message that stop the build.

cabal: dist-i386/build/Text/Pandoc_o_split: does not exist

I try with another package and got similar error message. It seems that split-objs not only being ignored by cross-compilation ghc, but will also fail the build.

Change History (1)

comment:1 Changed 12 months ago by rwbarton

  • Blocked By 8300 added

Currently the LLVM backend doesn't actually split objects anyways: see #8300.

Note: See TracTickets for help on using tickets.