[Asan] Link lit tests shared libraries with -Wl,z,origin on FreeBSD

Differential Revision: http://reviews.llvm.org/D8834

llvm-svn: 235297
This commit is contained in:
Viktor Kutuzov 2015-04-20 12:25:11 +00:00
parent c22555d977
commit aff5bb0518
1 changed files with 4 additions and 1 deletions

View File

@ -138,7 +138,10 @@ config.available_features.add("asan-" + config.bits + "-bits")
if config.host_os == 'Darwin':
config.substitutions.append( ("%ld_flags_rpath_exe", '-Wl,-rpath,@executable_path/ %dynamiclib') )
config.substitutions.append( ("%ld_flags_rpath_so", '-install_name @rpath/`basename %dynamiclib`') )
elif config.host_os in ['Linux', 'FreeBSD']:
elif config.host_os == 'FreeBSD':
config.substitutions.append( ("%ld_flags_rpath_exe", "-Wl,-z,origin -Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec") )
config.substitutions.append( ("%ld_flags_rpath_so", '') )
elif config.host_os == 'Linux':
config.substitutions.append( ("%ld_flags_rpath_exe", "-Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec") )
config.substitutions.append( ("%ld_flags_rpath_so", '') )