diff options
| author | Jeffrey Yasskin <jyasskin@google.com> | 2010-02-25 06:34:33 +0000 |
|---|---|---|
| committer | Jeffrey Yasskin <jyasskin@google.com> | 2010-02-25 06:34:33 +0000 |
| commit | 6b718f73a5d8f049b379bd3e1f0924940a9554c7 (patch) | |
| tree | 9e01e8bde8f84ebbda1104b92a274bc5aa573490 /llvm/test | |
| parent | b663ffe5f8e80945ce02149d908eb74079628e6a (diff) | |
| download | bcm5719-llvm-6b718f73a5d8f049b379bd3e1f0924940a9554c7.tar.gz bcm5719-llvm-6b718f73a5d8f049b379bd3e1f0924940a9554c7.zip | |
Try r96559 for the third time. This time the shared library is only built if
--enable-shared is passed to configure.
llvm-svn: 97119
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/Makefile | 2 | ||||
| -rw-r--r-- | llvm/test/Unit/lit.cfg | 9 | ||||
| -rw-r--r-- | llvm/test/Unit/lit.site.cfg.in | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/llvm/test/Makefile b/llvm/test/Makefile index 1ae54f45e33..3750fdb2f1d 100644 --- a/llvm/test/Makefile +++ b/llvm/test/Makefile @@ -198,4 +198,6 @@ Unit/lit.site.cfg: $(PROJ_OBJ_DIR)/Unit/.dir FORCE -e "s#@LLVM_TOOLS_DIR@#$(ToolDir)#g" \ -e "s#@LLVMGCCDIR@#$(LLVMGCCDIR)#g" \ -e "s#@LLVM_BUILD_MODE@#$(BuildMode)#g" \ + -e "s#@ENABLE_SHARED@#$(ENABLE_SHARED)#g" \ + -e "s#@SHLIBPATH_VAR@#$(SHLIBPATH_VAR)#g" \ $(PROJ_SRC_DIR)/Unit/lit.site.cfg.in > $@ diff --git a/llvm/test/Unit/lit.cfg b/llvm/test/Unit/lit.cfg index 34372bb6cbe..5fe07324a1b 100644 --- a/llvm/test/Unit/lit.cfg +++ b/llvm/test/Unit/lit.cfg @@ -23,7 +23,14 @@ config.test_format = lit.formats.GoogleTest(llvm_build_mode, 'Tests') ### -import os +# If necessary, point the dynamic loader at libLLVM.so. +if config.enable_shared: + libdir = os.path.join(config.llvm_obj_root, config.llvm_build_mode, 'lib') + shlibpath = config.environment.get(config.shlibpath_var,'') + if shlibpath: + shlibpath = ':' + shlibpath + shlibpath = libdir + shlibpath + config.environment[config.shlibpath_var] = shlibpath # Check that the object root is known. if config.test_exec_root is None: diff --git a/llvm/test/Unit/lit.site.cfg.in b/llvm/test/Unit/lit.site.cfg.in index c190ffa68e5..51b5bc416f6 100644 --- a/llvm/test/Unit/lit.site.cfg.in +++ b/llvm/test/Unit/lit.site.cfg.in @@ -5,6 +5,8 @@ config.llvm_obj_root = "@LLVM_BINARY_DIR@" config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" config.llvmgcc_dir = "@LLVMGCCDIR@" config.llvm_build_mode = "@LLVM_BUILD_MODE@" +config.enable_shared = @ENABLE_SHARED@ +config.shlibpath_var = "@SHLIBPATH_VAR@" # Let the main config do the real work. lit.load_config(config, "@LLVM_SOURCE_DIR@/test/Unit/lit.cfg") |

