summaryrefslogtreecommitdiff
path: root/git-annex.cabal
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-07-07 13:19:13 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-07-07 13:19:13 -0400
commit50e7fd784434f8efcc1598ce47b33608d078e9d4 (patch)
tree8f870af4093dbbf9f26b1a1bbd6d6516b860c0a3 /git-annex.cabal
parent8bb4e28404ac8c320e7a0fe31e29312920ed05fe (diff)
On linux, pass --as-needed to linker to avoid linking with unused shared libraries including libyaml.
Diffstat (limited to 'git-annex.cabal')
-rw-r--r--git-annex.cabal5
1 files changed, 5 insertions, 0 deletions
diff --git a/git-annex.cabal b/git-annex.cabal
index cd8347161..a53eecabb 100644
--- a/git-annex.cabal
+++ b/git-annex.cabal
@@ -133,6 +133,11 @@ Executable git-annex
-- Some things don't work with the non-threaded RTS.
GHC-Options: -threaded
+ -- Avoid linking with unused dynamic libaries.
+ -- (Only tested on Linux).
+ if os(Linux)
+ GHC-Options: -optl-Wl,--as-needed
+
if flag(network-uri)
Build-Depends: network-uri (>= 2.6), network (>= 2.6)
else