Commit 1d39571f authored by Ian Lynagh's avatar Ian Lynagh

Driver: define config.libdir for tests to use

We also use it internally, which saves us running "ghc --print-libdir"
on Windows.
parent a4349634
......@@ -132,6 +132,9 @@ def get_compiler_info():
rtsInfoDict = dict(eval(s))
# We use a '/'-separated path for libdir, even on Windows
config.libdir = re.sub('\\\\','/',compilerInfoDict['LibDir'])
v = compilerInfoDict["Project version"].split('-')
config.compiler_version = v[0]
config.compiler_maj_version = re.sub('^([0-9]+\.[0-9]+).*',r'\1', v[0])
......@@ -170,7 +170,7 @@ from testlib import *
# in order for the dynamic library tests to work.
if windows or darwin:
pkginfo = getStdout([config.ghc_pkg, 'dump'])
topdir = re.sub('\\\\','/',getStdout([config.compiler, '--print-libdir'])).rstrip()
topdir = config.libdir
for line in pkginfo.split('\n'):
if line.startswith('library-dirs:'):
path = line.rstrip()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment