summaryrefslogtreecommitdiffstats
path: root/libcxx/test
diff options
context:
space:
mode:
authorJonathan Roelofs <jonathan@codesourcery.com>2015-01-15 16:18:13 +0000
committerJonathan Roelofs <jonathan@codesourcery.com>2015-01-15 16:18:13 +0000
commit13be264db21c2cb051d21821e89b581ee8d82f37 (patch)
tree4d4c76b7a7bd8a3d90ee54b80d4d2c2d9011dcd1 /libcxx/test
parentf5adf13facb2a6ef4872501f4a2b3b746efcdb8e (diff)
downloadbcm5719-llvm-13be264db21c2cb051d21821e89b581ee8d82f37.tar.gz
bcm5719-llvm-13be264db21c2cb051d21821e89b581ee8d82f37.zip
Refactor configure_link_flags for modularity. NFC
llvm-svn: 226174
Diffstat (limited to 'libcxx/test')
-rw-r--r--libcxx/test/libcxx/test/config.py24
1 files changed, 16 insertions, 8 deletions
diff --git a/libcxx/test/libcxx/test/config.py b/libcxx/test/libcxx/test/config.py
index 5c97b94ed6a..be4c988b989 100644
--- a/libcxx/test/libcxx/test/config.py
+++ b/libcxx/test/libcxx/test/config.py
@@ -330,6 +330,20 @@ class Configuration(object):
def configure_link_flags(self):
self.link_flags += ['-nodefaultlibs']
+
+ # Configure library path
+ self.configure_link_flags_cxx_library_path()
+ self.configure_link_flags_abi_library_path()
+
+ # Configure libraries
+ self.configure_link_flags_cxx_library()
+ self.configure_link_flags_abi_library()
+ self.configure_extra_library_flags()
+
+ link_flags_str = self.get_lit_conf('link_flags', '')
+ self.link_flags += shlex.split(link_flags_str)
+
+ def configure_link_flags_cxx_library_path(self):
libcxx_library = self.get_lit_conf('libcxx_library')
# Configure libc++ library paths.
if libcxx_library is not None:
@@ -347,20 +361,14 @@ class Configuration(object):
elif not self.use_system_cxx_lib:
self.link_flags += ['-L' + self.cxx_library_root,
'-Wl,-rpath,' + self.cxx_library_root]
+
+ def configure_link_flags_abi_library_path(self):
# Configure ABI library paths.
abi_library_path = self.get_lit_conf('abi_library_path', '')
if abi_library_path:
self.link_flags += ['-L' + abi_library_path,
'-Wl,-rpath,' + abi_library_path]
- # Configure libraries
- self.configure_link_flags_cxx_library()
- self.configure_link_flags_abi_library()
- self.configure_extra_library_flags()
-
- link_flags_str = self.get_lit_conf('link_flags', '')
- self.link_flags += shlex.split(link_flags_str)
-
def configure_link_flags_cxx_library(self):
libcxx_library = self.get_lit_conf('libcxx_library')
if libcxx_library:
OpenPOWER on IntegriCloud