diff --git a/giscanner/dumper.py b/giscanner/dumper.py
index b61e388..be161ca 100644
--- a/giscanner/dumper.py
+++ b/giscanner/dumper.py
@@ -199,6 +199,7 @@ class DumpCompiler(object):
 
         # Search the current directory first
         args.append('-L.')
+        args.append('-Wl,-rpath=.')
 
         uninst_builddir = os.environ.get('UNINSTALLED_INTROSPECTION_BUILDDIR')
         if not uninst_builddir:
