@@ -169,31 +169,31 @@ def getToolchainUtil(util_name):
169169 if not os .getenv ("LLVM_AR" ):
170170 utils .extend (["LLVM_AR=%s" % getToolchainUtil ("llvm-ar" )])
171171
172- if not lldbplatformutil .platformIsDarwin ():
173- if cc_type in ["clang" , "cc" , "gcc" ]:
174- util_paths = {}
175- # Assembly a toolchain side tool cmd based on passed CC.
176- for var , name in util_names .items ():
177- # Do not override explicity specified tool from the cmd line.
178- if not os .getenv (var ):
179- util_paths [var ] = getToolchainUtil ("llvm-" + name )
180- else :
181- util_paths [var ] = os .getenv (var )
182- utils .extend (["AR=%s" % util_paths ["ARCHIVER" ]])
183-
184- # Look for llvm-dwp or gnu dwp
185- if not lldbutil .which (util_paths ["DWP" ]):
186- util_paths ["DWP" ] = getToolchainUtil ("llvm-dwp" )
187- if not lldbutil .which (util_paths ["DWP" ]):
188- util_paths ["DWP" ] = lldbutil .which ("llvm-dwp" )
172+ if cc_type in ["clang" , "cc" , "gcc" ]:
173+ util_paths = {}
174+ # Assembly a toolchain side tool cmd based on passed CC.
175+ for var , name in util_names .items ():
176+ # Do not override explicity specified tool from the cmd line.
177+ if not os .getenv (var ):
178+ util_paths [var ] = getToolchainUtil ("llvm-" + name )
179+ else :
180+ util_paths [var ] = os .getenv (var )
181+ utils .extend (["AR=%s" % util_paths ["ARCHIVER" ]])
182+
183+ # Look for llvm-dwp or gnu dwp
184+ if not lldbutil .which (util_paths ["DWP" ]):
185+ util_paths ["DWP" ] = getToolchainUtil ("llvm-dwp" )
186+ if not lldbutil .which (util_paths ["DWP" ]):
187+ util_paths ["DWP" ] = lldbutil .which ("llvm-dwp" )
188+ if not util_paths ["DWP" ]:
189+ util_paths ["DWP" ] = lldbutil .which ("dwp" )
189190 if not util_paths ["DWP" ]:
190- util_paths ["DWP" ] = lldbutil .which ("dwp" )
191- if not util_paths ["DWP" ]:
192- del util_paths ["DWP" ]
191+ del util_paths ["DWP" ]
193192
194- for var , path in util_paths .items ():
195- utils .append ("%s=%s" % (var , path ))
196- else :
193+ for var , path in util_paths .items ():
194+ utils .append ("%s=%s" % (var , path ))
195+
196+ if lldbplatformutil .platformIsDarwin ():
197197 utils .extend (["AR=%slibtool" % os .getenv ("CROSS_COMPILE" , "" )])
198198
199199 return [
0 commit comments