@@ -124,8 +124,9 @@ def configure(self):
124124 self .configure_obj_root ()
125125 self .cxx_stdlib_under_test = self .get_lit_conf ('cxx_stdlib_under_test' , 'libc++' )
126126 self .cxx_library_root = self .get_lit_conf ('cxx_library_root' , self .libcxx_obj_root )
127- self .abi_library_root = self .get_lit_conf ('abi_library_path ' , None )
127+ self .abi_library_root = self .get_lit_conf ('abi_library_root ' , None )
128128 self .cxx_runtime_root = self .get_lit_conf ('cxx_runtime_root' , self .cxx_library_root )
129+ self .abi_runtime_root = self .get_lit_conf ('abi_runtime_root' , self .abi_library_root )
129130 self .configure_compile_flags ()
130131 self .configure_link_flags ()
131132 self .configure_env ()
@@ -158,6 +159,8 @@ def print_config_info(self):
158159 self .lit_config .note ('Adding environment variables: %r' % show_env_vars )
159160 self .lit_config .note ("Linking against the C++ Library at {}" .format (self .cxx_library_root ))
160161 self .lit_config .note ("Running against the C++ Library at {}" .format (self .cxx_runtime_root ))
162+ self .lit_config .note ("Linking against the ABI Library at {}" .format (self .abi_library_root ))
163+ self .lit_config .note ("Running against the ABI Library at {}" .format (self .abi_runtime_root ))
161164 sys .stderr .flush () # Force flushing to avoid broken output on Windows
162165
163166 def get_test_format (self ):
@@ -423,10 +426,11 @@ def configure_link_flags_abi_library_path(self):
423426 # Configure ABI library paths.
424427 if self .abi_library_root :
425428 self .cxx .link_flags += ['-L' + self .abi_library_root ]
429+ if self .abi_runtime_root :
426430 if not self .target_info .is_windows ():
427- self .cxx .link_flags += ['-Wl,-rpath,' + self .abi_library_root ]
431+ self .cxx .link_flags += ['-Wl,-rpath,' + self .abi_runtime_root ]
428432 else :
429- self .add_path (self .exec_env , self .abi_library_root )
433+ self .add_path (self .exec_env , self .abi_runtime_root )
430434
431435 def configure_link_flags_cxx_library (self ):
432436 if self .link_shared :
@@ -460,7 +464,6 @@ def configure_link_flags_abi_library(self):
460464 if self .abi_library_root :
461465 libname = self .make_static_lib_name ('c++abi' )
462466 abs_path = os .path .join (self .abi_library_root , libname )
463- self .cxx .link_libcxxabi_flag = abs_path
464467 self .cxx .link_flags += [abs_path ]
465468 else :
466469 self .cxx .link_flags += ['-lc++abi' ]
@@ -590,7 +593,7 @@ def configure_substitutions(self):
590593 sub .append (('%{flags}' , ' ' .join (map (pipes .quote , flags ))))
591594 sub .append (('%{compile_flags}' , ' ' .join (map (pipes .quote , compile_flags ))))
592595 sub .append (('%{link_flags}' , ' ' .join (map (pipes .quote , self .cxx .link_flags ))))
593- sub . append (( '%{link_libcxxabi}' , pipes . quote ( self . cxx . link_libcxxabi_flag )))
596+
594597 codesign_ident = self .get_lit_conf ('llvm_codesign_identity' , '' )
595598 env_vars = ' ' .join ('%s=%s' % (k , pipes .quote (v )) for (k , v ) in self .exec_env .items ())
596599 exec_args = [
0 commit comments