[PATCH] D65772: Add support for FreeBSD's LD_32_LIBRARY_PATH
Dimitry Andric via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 10 12:07:39 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL368516: Add support for FreeBSD's LD_32_LIBRARY_PATH (authored by dim, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D65772?vs=213447&id=214537#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65772/new/
https://reviews.llvm.org/D65772
Files:
compiler-rt/trunk/test/asan/Unit/lit.site.cfg.py.in
compiler-rt/trunk/test/asan/lit.cfg.py
compiler-rt/trunk/test/xray/Unit/lit.site.cfg.py.in
Index: compiler-rt/trunk/test/xray/Unit/lit.site.cfg.py.in
===================================================================
--- compiler-rt/trunk/test/xray/Unit/lit.site.cfg.py.in
+++ compiler-rt/trunk/test/xray/Unit/lit.site.cfg.py.in
@@ -1,6 +1,7 @@
@LIT_SITE_CFG_IN_HEADER@
import os
+import platform
# Load common config for all compiler-rt unit tests.
lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/unittests/lit.common.unit.configured")
@@ -22,3 +23,10 @@
config.environment['LD_LIBRARY_PATH'] = libdirs
else:
config.environment['LD_LIBRARY_PATH'] = config.llvm_lib_dir
+
+if platform.system() == 'FreeBSD':
+ if 'LD_32_LIBRARY_PATH' in os.environ:
+ libdirs = os.path.pathsep.join((config.llvm_lib_dir, os.environ['LD_32_LIBRARY_PATH']))
+ config.environment['LD_32_LIBRARY_PATH'] = libdirs
+ else:
+ config.environment['LD_32_LIBRARY_PATH'] = config.llvm_lib_dir
Index: compiler-rt/trunk/test/asan/Unit/lit.site.cfg.py.in
===================================================================
--- compiler-rt/trunk/test/asan/Unit/lit.site.cfg.py.in
+++ compiler-rt/trunk/test/asan/Unit/lit.site.cfg.py.in
@@ -1,6 +1,7 @@
@LIT_SITE_CFG_IN_HEADER@
import os
+import platform
# Load common config for all compiler-rt unit tests.
lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/unittests/lit.common.unit.configured")
@@ -10,6 +11,11 @@
(new_path, config.environment.get('LD_LIBRARY_PATH', '')))
config.environment['LD_LIBRARY_PATH'] = new_ld_library_path
+ if platform.system() == 'FreeBSD':
+ new_ld_32_library_path = os.path.pathsep.join(
+ (new_path, config.environment.get('LD_32_LIBRARY_PATH', '')))
+ config.environment['LD_32_LIBRARY_PATH'] = new_ld_32_library_path
+
# Setup config name.
config.name = 'AddressSanitizer-Unit'
Index: compiler-rt/trunk/test/asan/lit.cfg.py
===================================================================
--- compiler-rt/trunk/test/asan/lit.cfg.py
+++ compiler-rt/trunk/test/asan/lit.cfg.py
@@ -36,6 +36,12 @@
(new_path, config.environment.get(dynamic_library_lookup_var, '')))
config.environment[dynamic_library_lookup_var] = new_ld_library_path
+ if platform.system() == 'FreeBSD':
+ dynamic_library_lookup_var = 'LD_32_LIBRARY_PATH'
+ new_ld_32_library_path = os.path.pathsep.join(
+ (new_path, config.environment.get(dynamic_library_lookup_var, '')))
+ config.environment[dynamic_library_lookup_var] = new_ld_32_library_path
+
# Setup config name.
config.name = 'AddressSanitizer' + config.name_suffix
@@ -111,7 +117,7 @@
config.substitutions.append( ("%clang_asan ", build_invocation(clang_asan_cflags)) )
config.substitutions.append( ("%clangxx_asan ", build_invocation(clang_asan_cxxflags)) )
if config.asan_dynamic:
- if config.host_os in ['Linux', 'NetBSD', 'SunOS']:
+ if config.host_os in ['Linux', 'FreeBSD', 'NetBSD', 'SunOS']:
shared_libasan_path = os.path.join(config.compiler_rt_libdir, "libclang_rt.asan{}.so".format(config.target_suffix))
elif config.host_os == 'Darwin':
shared_libasan_path = os.path.join(config.compiler_rt_libdir, 'libclang_rt.asan_{}_dynamic.dylib'.format(config.apple_platform))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65772.214537.patch
Type: text/x-patch
Size: 3192 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190810/7095ece5/attachment.bin>
More information about the llvm-commits
mailing list