[3.10] bpo-45371: Fix distutils' rpath support for clang (GH-28732) (… · python/cpython@3733ddd

Original file line numberDiff line numberDiff line change

@@ -215,7 +215,8 @@ def library_dir_option(self, dir):

215215

return "-L" + dir

216216
217217

def _is_gcc(self, compiler_name):

218-

return "gcc" in compiler_name or "g++" in compiler_name

218+

# clang uses same syntax for rpath as gcc

219+

return any(name in compiler_name for name in ("gcc", "g++", "clang"))

219220
220221

def runtime_library_dir_option(self, dir):

221222

# XXX Hackish, at the very least. See Python bug #445902: