diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-04-20 04:17:39 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-04-20 04:17:39 +0000 |
commit | cf4550d351a2db5ed8e44d1e58274365a7853b09 (patch) | |
tree | 5e48a7d3e513db20982364e7d12731bfa2b825be | |
parent | e94c1aee2bef8ee8671d56160e2c27f9704646ae (diff) | |
download | libcxx-cf4550d351a2db5ed8e44d1e58274365a7853b09.tar.gz |
Add cxx_runtime_root options for testing against a different libc++ at runtime
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@266855 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | docs/TestingLibcxx.rst | 17 | ||||
-rw-r--r-- | test/libcxx/test/config.py | 11 | ||||
-rw-r--r-- | test/libcxx/test/target_info.py | 4 |
3 files changed, 23 insertions, 9 deletions
diff --git a/docs/TestingLibcxx.rst b/docs/TestingLibcxx.rst index 98162d9c2..5aecc07c7 100644 --- a/docs/TestingLibcxx.rst +++ b/docs/TestingLibcxx.rst @@ -118,11 +118,20 @@ configuration. Passing the option on the command line will override the default. Specify the libc++ headers that are tested. By default the headers in the source tree are used. -.. option:: libcxx_library=<path/to/libc++.so> +.. option:: cxx_library_root=<path/to/lib/> - Specify the libc++ library that is tested. By default the library in the - build directory is used. This option cannot be used when use_system_lib is - provided. + Specify the directory of the libc++ library to be tested. By default the + library folder of the build directory is used. This option cannot be used + when use_system_lib is provided. + + +.. option:: cxx_runtime_root=<path/to/lib/> + + Specify the directory of the libc++ library to use at runtime. This directory + is not added to the linkers search path. This can be used to compile tests + against one version of libc++ and run them using another. The default value + for this option is `cxx_library_root`. This option cannot be used + when use_system_lib is provided. .. option:: use_system_lib=<bool> diff --git a/test/libcxx/test/config.py b/test/libcxx/test/config.py index 3cd9114af..156b424fd 100644 --- a/test/libcxx/test/config.py +++ b/test/libcxx/test/config.py @@ -61,6 +61,7 @@ class Configuration(object): self.libcxx_src_root = None self.libcxx_obj_root = None self.cxx_library_root = None + self.cxx_runtime_root = None self.abi_library_root = None self.env = {} self.use_target = False @@ -195,6 +196,8 @@ class Configuration(object): def configure_cxx_library_root(self): self.cxx_library_root = self.get_lit_conf('cxx_library_root', self.libcxx_obj_root) + self.cxx_runtime_root = self.get_lit_conf('cxx_runtime_root', + self.cxx_library_root) def configure_use_system_cxx_lib(self): # This test suite supports testing against either the system library or @@ -439,9 +442,11 @@ class Configuration(object): self.cxx.link_flags += shlex.split(link_flags_str) def configure_link_flags_cxx_library_path(self): - if not self.use_system_cxx_lib and self.cxx_library_root: - self.cxx.link_flags += ['-L' + self.cxx_library_root, - '-Wl,-rpath,' + self.cxx_library_root] + if not self.use_system_cxx_lib: + if self.cxx_library_root: + self.cxx.link_flags += ['-L' + self.cxx_library_root] + if self.cxx_runtime_root: + self.cxx.link_flags += ['-Wl,-rpath,' + self.cxx_runtime_root] def configure_link_flags_abi_library_path(self): # Configure ABI library paths. diff --git a/test/libcxx/test/target_info.py b/test/libcxx/test/target_info.py index 71adbeb1f..a743595a1 100644 --- a/test/libcxx/test/target_info.py +++ b/test/libcxx/test/target_info.py @@ -92,8 +92,8 @@ class DarwinLocalTI(DefaultTargetInfo): # Configure the library path for libc++ if self.full_config.use_system_cxx_lib: pass - elif self.full_config.cxx_library_root: - library_paths += [self.full_config.cxx_library_root] + elif self.full_config.cxx_runtime_root: + library_paths += [self.full_config.cxx_runtime_root] # Configure the abi library path if self.full_config.abi_library_root: library_paths += [self.full_config.abi_library_root] |