Setup ORIGIN/NetBSD option in sanitizer tests
authorKamil Rytarowski <n54@gmx.com>
Thu, 10 May 2018 20:13:36 +0000 (20:13 +0000)
committerKamil Rytarowski <n54@gmx.com>
Thu, 10 May 2018 20:13:36 +0000 (20:13 +0000)
Summary:
NetBSD can use the approach that exists in FreeBSD, Linux and SunOS.

Pick the FreeBSD one as marking programs with "-z origin" is useful.

Sponsored by <The NetBSD Foundation>

Reviewers: joerg, vitalybuka, kcc

Reviewed By: vitalybuka

Subscribers: emaste, fedor.sergeev, llvm-commits, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D46718

llvm-svn: 332035

compiler-rt/test/lit.common.cfg

index e813a65..3703591 100644 (file)
@@ -312,7 +312,7 @@ if config.host_os == 'Darwin' and config.ios and not config.iossim:
 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 == 'FreeBSD':
+elif config.host_os == 'FreeBSD' or config.host_os == 'NetBSD':
   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':