[GHC] #8629: Option 'split-objs' being ignored when trying to reduce object code size in iOS cross-compilation
#8629: Option 'split-objs' being ignored when trying to reduce object code size in iOS cross-compilation ------------------------------------+--------------------------------- Reporter: f1rstmistake | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Keywords: ios | Operating System: MacOS X Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+--------------------------------- 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. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8629> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8629: Option 'split-objs' being ignored when trying to reduce object code size in iOS cross-compilation ---------------------------------+------------------------------------ Reporter: f1rstmistake | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: ios Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: 8300 Blocking: | Related Tickets: ---------------------------------+------------------------------------ Changes (by rwbarton): * blockedby: => 8300 Comment: Currently the LLVM backend doesn't actually split objects anyways: see #8300. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8629#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8629: Option 'split-objs' being ignored when trying to reduce object code size in iOS cross-compilation ---------------------------------+---------------------------------------- Reporter: f1rstmistake | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: ios 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: | ---------------------------------+---------------------------------------- Comment (by dobenour): I think that the problem is that `-dead_strip` isn't doing its job. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8629#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8629: Option 'split-objs' being ignored when trying to reduce object code size in iOS cross-compilation ---------------------------------+---------------------------------------- Reporter: f1rstmistake | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: ios 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: | ---------------------------------+---------------------------------------- Comment (by Marge Bot <ben+marge-bot@…>): In [changeset:"37f257afcd6a52cf4d76c60d766b1aeb520b9f05/ghc" 37f257af/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="37f257afcd6a52cf4d76c60d766b1aeb520b9f05" Rip out object splitting The splitter is an evil Perl script that processes assembler code. Its job can be done better by the linker's --gc-sections flag. GHC passes this flag to the linker whenever -split-sections is passed on the command line. This is based on @DemiMarie's D2768. Fixes Trac #11315 Fixes Trac #9832 Fixes Trac #8964 Fixes Trac #8685 Fixes Trac #8629 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8629#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8629: Option 'split-objs' being ignored when trying to reduce object code size in iOS cross-compilation ---------------------------------+---------------------------------------- Reporter: f1rstmistake | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 7.6.3 Resolution: fixed | Keywords: ios 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: | ---------------------------------+---------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed * milestone: => 8.10.1 Comment: `-split-objs` has been removed in favor of `-split-sections`. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8629#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC