Opened 4 years ago

Last modified 9 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 Rev(s):
Wiki Page:


I have been trying to statically link Pandoc packages to iOS application following the guide in 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-
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 (2)

comment:1 Changed 3 years ago by rwbarton

Blocked By: 8300 added

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

comment:2 Changed 9 months ago by dobenour

I think that the problem is that -dead_strip isn't doing its job.

Note: See TracTickets for help on using tickets.