Let libc++'s LIT configuration setup our linker paths and env.

llvm-svn: 232529
This commit is contained in:
Eric Fiselier 2015-03-17 19:45:21 +00:00
parent c3d60efb1d
commit cf74f5d20b
2 changed files with 2 additions and 18 deletions

View File

@ -10,7 +10,7 @@ class Configuration(LibcxxConfiguration):
super(Configuration, self).__init__(lit_config, config)
self.libcxxabi_src_root = None
self.libcxxabi_obj_root = None
self.libcxxabi_lib_root = None
self.abi_library_path = None
self.libcxx_src_root = None
def configure_src_root(self):
@ -23,8 +23,6 @@ class Configuration(LibcxxConfiguration):
def configure_obj_root(self):
self.libcxxabi_obj_root = self.get_lit_conf('libcxxabi_obj_root')
self.libcxxabi_lib_root = self.get_lit_conf('libcxxabi_lib_root',
self.libcxxabi_obj_root)
super(Configuration, self).configure_obj_root()
def configure_compile_flags(self):
@ -60,12 +58,6 @@ class Configuration(LibcxxConfiguration):
def configure_compile_flags_no_monotonic_clock(self):
pass
def configure_link_flags_abi_library_path(self):
# Configure ABI library paths.
if self.libcxxabi_lib_root:
self.cxx.link_flags += ['-L' + self.libcxxabi_lib_root,
'-Wl,-rpath,' + self.libcxxabi_lib_root]
# TODO(ericwf): Remove this. This is a hack for OS X.
# libc++ *should* export all of the symbols found in libc++abi on OS X.
# For this reason LibcxxConfiguration will not link libc++abi in OS X.
@ -75,11 +67,3 @@ class Configuration(LibcxxConfiguration):
def configure_link_flags_abi_library(self):
self.cxx.link_flags += ['-lc++abi']
def configure_env(self):
library_paths = []
if self.libcxxabi_lib_root:
library_paths += [self.libcxxabi_lib_root]
if self.cxx_library_root:
library_paths += [self.cxx_library_root]
if sys.platform == 'darwin' and library_paths:
self.env['DYLD_LIBRARY_PATH'] = ':'.join(library_paths)

View File

@ -2,7 +2,7 @@
config.cxx_under_test = "@LIBCXXABI_COMPILER@"
config.libcxxabi_src_root = "@LIBCXXABI_SOURCE_DIR@"
config.libcxxabi_obj_root = "@LIBCXXABI_BINARY_DIR@"
config.libcxxabi_lib_root = "@LIBCXXABI_LIBRARY_DIR@"
config.abi_library_path = "@LIBCXXABI_LIBRARY_DIR@"
config.libcxx_src_root = "@LIBCXXABI_LIBCXX_PATH@"
config.cxx_headers = "@LIBCXXABI_LIBCXX_INCLUDES@"
config.cxx_library_root = "@LIBCXXABI_LIBCXX_LIBRARY_PATH@"