git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #2046 from jplatte/link-as-needed

Add --as-needed linker option to stop linking against unused shared objects

commit84f4256ea26e30d1560507d4adefef732b8e06f6 authorPhil Freeman <paf31@cantab.net> dateWed 20 Apr 2016, 09:13 (11 years ago) parent4efa0d956df015
1 file changed+13−8
purescript.cabal+13−8
purescript.cabal+13−8
@@ -244,6 +244,7 @@ executable psc
244244 hs-source-dirs: psc
245245 other-modules: Paths_purescript
246246 ghc-options: -Wall -O2 -fno-warn-unused-do-bind -threaded -rtsopts "-with-rtsopts=-N"
247+ ld-options: -Wl,--as-needed
247248
248249executable psci
249250 build-depends: base >=4 && <5, containers -any, directory -any, filepath -any,
@@ -267,6 +268,7 @@ executable psci
267268 PSCi.Printer
268269 Paths_purescript
269270 ghc-options: -Wall -O2
271+ ld-options: -Wl,--as-needed
270272
271273executable psc-docs
272274 build-depends: base >=4 && <5, purescript -any,
@@ -282,6 +284,7 @@ executable psc-docs
282284 Etags
283285 Tags
284286 ghc-options: -Wall -O2
287+ ld-options: -Wl,--as-needed
285288
286289executable psc-publish
287290 build-depends: base >=4 && <5, purescript -any, bytestring -any, aeson -any, optparse-applicative -any
@@ -290,6 +293,7 @@ executable psc-publish
290293 buildable: True
291294 hs-source-dirs: psc-publish
292295 ghc-options: -Wall -O2
296+ ld-options: -Wl,--as-needed
293297
294298executable psc-hierarchy
295299 build-depends: base >=4 && <5, purescript -any, optparse-applicative >= 0.12.1,
@@ -299,13 +303,12 @@ executable psc-hierarchy
299303 other-modules: Paths_purescript
300304 buildable: True
301305 hs-source-dirs: hierarchy
302− other-modules:
303306 ghc-options: -Wall -O2
307+ ld-options: -Wl,--as-needed
304308
305309executable psc-bundle
306310 main-is: Main.hs
307311 other-modules: Paths_purescript
308− other-extensions:
309312 build-depends: base >=4 && <5,
310313 purescript -any,
311314 filepath -any,
@@ -315,13 +318,13 @@ executable psc-bundle
315318 transformers-compat -any,
316319 optparse-applicative >= 0.12.1,
317320 Glob -any
318− ghc-options: -Wall -O2
319321 hs-source-dirs: psc-bundle
322+ ghc-options: -Wall -O2
323+ ld-options: -Wl,--as-needed
320324
321325executable psc-ide-server
322326 main-is: Main.hs
323327 other-modules: Paths_purescript
324− other-extensions:
325328 build-depends: base >=4 && <5
326329 , purescript -any
327330 , directory -any
@@ -335,21 +338,22 @@ executable psc-ide-server
335338 , stm -any
336339 , text -any
337340 , base-compat >=0.6.0
338− ghc-options: -Wall -O2 -threaded
339341 hs-source-dirs: psc-ide-server
342+ ghc-options: -Wall -O2 -threaded
343+ ld-options: -Wl,--as-needed
340344
341345executable psc-ide-client
342346 main-is: Main.hs
343347 other-modules: Paths_purescript
344− other-extensions:
345348 build-depends: base >=4 && <5
346349 , mtl -any
347350 , text -any
348351 , optparse-applicative >= 0.12.1
349352 , network -any
350353 , base-compat >=0.6.0
351− ghc-options: -Wall -O2
352354 hs-source-dirs: psc-ide-client
355+ ghc-options: -Wall -O2
356+ ld-options: -Wl,--as-needed
353357
354358test-suite tests
355359 build-depends: base >=4 && <5, containers -any, directory -any,
@@ -359,7 +363,6 @@ test-suite tests
359363 base-compat -any, haskeline >= 0.7.0.0, optparse-applicative -any,
360364 boxes -any, HUnit -any, hspec -any, hspec-discover -any, stm -any, text -any,
361365 vector -any, utf8-string -any
362− ghc-options: -Wall
363366 type: exitcode-stdio-1.0
364367 main-is: Main.hs
365368 other-modules: TestUtils
@@ -383,3 +386,5 @@ test-suite tests
383386 PSCi.Types
384387 buildable: True
385388 hs-source-dirs: tests psci
389+ ghc-options: -Wall
390+ ld-options: -Wl,--as-needed