forked from OSchip/llvm-project
Add cxx_runtime_root options for testing against a different libc++ at runtime
llvm-svn: 266855
This commit is contained in:
parent
2c719cc117
commit
f40dd3278e
|
@ -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>
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue