Author: ericwf Date: Tue Apr 19 23:17:39 2016 New Revision: 266855 URL: http://llvm.org/viewvc/llvm-project?rev=266855&view=rev Log: Add cxx_runtime_root options for testing against a different libc++ at runtime
Modified: libcxx/trunk/docs/TestingLibcxx.rst libcxx/trunk/test/libcxx/test/config.py libcxx/trunk/test/libcxx/test/target_info.py Modified: libcxx/trunk/docs/TestingLibcxx.rst URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/docs/TestingLibcxx.rst?rev=266855&r1=266854&r2=266855&view=diff ============================================================================== --- libcxx/trunk/docs/TestingLibcxx.rst (original) +++ libcxx/trunk/docs/TestingLibcxx.rst Tue Apr 19 23:17:39 2016 @@ -118,11 +118,20 @@ configuration. Passing the option on the 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> Modified: libcxx/trunk/test/libcxx/test/config.py URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/test/config.py?rev=266855&r1=266854&r2=266855&view=diff ============================================================================== --- libcxx/trunk/test/libcxx/test/config.py (original) +++ libcxx/trunk/test/libcxx/test/config.py Tue Apr 19 23:17:39 2016 @@ -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. Modified: libcxx/trunk/test/libcxx/test/target_info.py URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/test/target_info.py?rev=266855&r1=266854&r2=266855&view=diff ============================================================================== --- libcxx/trunk/test/libcxx/test/target_info.py (original) +++ libcxx/trunk/test/libcxx/test/target_info.py Tue Apr 19 23:17:39 2016 @@ -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] _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits