diff options
-rw-r--r-- | libcxx/docs/TestingLibcxx.rst | 17 | ||||
-rw-r--r-- | libcxx/test/libcxx/test/config.py | 11 | ||||
-rw-r--r-- | libcxx/test/libcxx/test/target_info.py | 4 |
3 files changed, 23 insertions, 9 deletions
diff --git a/libcxx/docs/TestingLibcxx.rst b/libcxx/docs/TestingLibcxx.rst index 98162d9c2e0..5aecc07c744 100644 --- a/libcxx/docs/TestingLibcxx.rst +++ b/libcxx/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/libcxx/test/libcxx/test/config.py b/libcxx/test/libcxx/test/config.py index 3cd9114afce..156b424fd5a 100644 --- a/libcxx/test/libcxx/test/config.py +++ b/libcxx/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/libcxx/test/libcxx/test/target_info.py b/libcxx/test/libcxx/test/target_info.py index 71adbeb1f2b..a743595a104 100644 --- a/libcxx/test/libcxx/test/target_info.py +++ b/libcxx/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] |