@@ -165,14 +165,22 @@ def push_dynamic_library_lookup_path(config, new_path):
165165# tests on 64-bit hosts and vice versa. Adjust config.compiler_rt_libdir
166166# accordingly.
167167if config .enable_per_target_runtime_dir :
168- if config .target_arch == 'i386' :
169- config .compiler_rt_libdir = re .sub (r'/x86_64(?=-[^/]+$)' , '/i386' , config .compiler_rt_libdir )
170- elif config .target_arch == 'x86_64' :
171- config .compiler_rt_libdir = re .sub (r'/i386(?=-[^/]+$)' , '/x86_64' , config .compiler_rt_libdir )
172- if config .target_arch == 'sparc' :
173- config .compiler_rt_libdir = re .sub (r'/sparcv9(?=-[^/]+$)' , '/sparc' , config .compiler_rt_libdir )
174- elif config .target_arch == 'sparcv9' :
175- config .compiler_rt_libdir = re .sub (r'/sparc(?=-[^/]+$)' , '/sparcv9' , config .compiler_rt_libdir )
168+ if config .target_arch == "i386" :
169+ config .compiler_rt_libdir = re .sub (
170+ r"/x86_64(?=-[^/]+$)" , "/i386" , config .compiler_rt_libdir
171+ )
172+ elif config .target_arch == "x86_64" :
173+ config .compiler_rt_libdir = re .sub (
174+ r"/i386(?=-[^/]+$)" , "/x86_64" , config .compiler_rt_libdir
175+ )
176+ if config .target_arch == "sparc" :
177+ config .compiler_rt_libdir = re .sub (
178+ r"/sparcv9(?=-[^/]+$)" , "/sparc" , config .compiler_rt_libdir
179+ )
180+ elif config .target_arch == "sparcv9" :
181+ config .compiler_rt_libdir = re .sub (
182+ r"/sparc(?=-[^/]+$)" , "/sparcv9" , config .compiler_rt_libdir
183+ )
176184
177185# Check if the test compiler resource dir matches the local build directory
178186# (which happens with -DLLVM_ENABLE_PROJECTS=clang;compiler-rt) or if we are
0 commit comments