[PATCH] D31486: libc++ testing: allow to provide a path for `use_system_cxx_lib`
Mehdi AMINI via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 29 18:07:24 PDT 2017
mehdi_amini created this revision.
As we're trying to setup testing / bots for all shipping version of libc++
on macOS/iOS, we'll need to be able to pass a path to where to find the
dylib for each previous version of the OS.
https://reviews.llvm.org/D31486
Files:
utils/libcxx/test/config.py
Index: utils/libcxx/test/config.py
===================================================================
--- utils/libcxx/test/config.py
+++ utils/libcxx/test/config.py
@@ -275,7 +275,13 @@
# compatibility between the current headers and a shipping dynamic
# library.
# Default to testing against the locally built libc++ library.
- self.use_system_cxx_lib = self.get_lit_bool('use_system_cxx_lib', False)
+ self.use_system_cxx_lib = self.get_lit_conf('use_system_cxx_lib')
+ if self.use_system_cxx_lib == 'true':
+ self.use_system_cxx_lib = True
+ elif self.use_system_cxx_lib == 'false':
+ self.use_system_cxx_lib = False
+ else:
+ assert os.path.isdir(self.use_system_cxx_lib)
self.lit_config.note(
"inferred use_system_cxx_lib as: %r" % self.use_system_cxx_lib)
@@ -719,6 +725,13 @@
self.cxx_runtime_root]
elif self.is_windows and self.link_shared:
self.add_path(self.exec_env, self.cxx_runtime_root)
+ elif os.path.isdir(self.use_system_cxx_lib):
+ self.cxx.link_flags += ['-L' + self.use_system_cxx_lib]
+ if not self.is_windows:
+ self.cxx.link_flags += ['-Wl,-rpath,' +
+ self.use_system_cxx_lib]
+ if self.is_windows and self.link_shared:
+ self.add_path(self.cxx.compile_env, self.use_system_cxx_lib)
def configure_link_flags_abi_library_path(self):
# Configure ABI library paths.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31486.93432.patch
Type: text/x-patch
Size: 1616 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170330/fbccee8b/attachment.bin>
More information about the cfe-commits
mailing list