[PATCH] Link against installed library when running lldb test with gcc-4.9.2
Ying Chen
chying at google.com
Wed May 20 18:09:09 PDT 2015
Hi sivachandra, vharron,
-Read location of compiler and find library path based on that
-Set -L option to CXXFLAGS which will be used during linking and set LD_LIBRARY_PATH to shell environment
http://reviews.llvm.org/D9902
Files:
zorg/buildbot/builders/LLDBBuilder.py
Index: zorg/buildbot/builders/LLDBBuilder.py
===================================================================
--- zorg/buildbot/builders/LLDBBuilder.py
+++ zorg/buildbot/builders/LLDBBuilder.py
@@ -238,6 +238,20 @@
workdir='%s/tools/lldb/test' % llvm_objdir))
return f
+# Get library path and add to shell environment
+def getLibPath(f, compilerPath, env):
+ testenv = dict(env)
+ # Determine the installed library path.
+ f.addStep(SetProperty(name="get_ccdir",
+ command="dirname $(readlink $(which " + compilerPath + "))",
+ property="ccdir",
+ description="set compiler dir",
+ workdir="."))
+ libdir = "%(ccdir)s/../lib64"
+ testenv['LD_LIBRARY_PATH'] = WithProperties(libdir)
+ testenv['CXXFLAGS'] = WithProperties("-L"+libdir)
+ return testenv
+
# Add test steps from list of compilers and archs
def getLLDBTestSteps(f,
bindir,
@@ -272,12 +286,13 @@
'-A %s ' % arch,
'-C %s ' % compilerPath,
'-s lldb-test-traces-%s-%s ' % (compiler, arch),
- '-u CXXFLAGS ',
'-u CFLAGS ',
'--channel ',
'"gdb-remote packets" ',
'--channel ',
'"lldb all"'])
+ if 'gcc4.9' in compilerPath:
+ testenv=getLibPath(f, compilerPath, env)
testname = "local"
if remote_platform is not None:
urlStr='connect://%(remote_host)s:%(remote_port)s'
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9902.26199.patch
Type: text/x-patch
Size: 1782 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150521/b909c492/attachment.bin>
More information about the llvm-commits
mailing list