summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-10-05 03:04:52 -0700
committerGitHub <noreply@github.com>2021-10-05 03:04:52 -0700
commit3733dddecaa332966e200718d4993545f8e52247 (patch)
treeff2c116fa9420e4afda1f66506d661a7fa7220f5 /Lib
parent872b1e537e96d0dc4ff37c738031940b5d271366 (diff)
downloadcpython-git-3733dddecaa332966e200718d4993545f8e52247.tar.gz
[3.10] bpo-45371: Fix distutils' rpath support for clang (GH-28732) (GH-28733)
Signed-off-by: Christian Heimes <christian@python.org> (cherry picked from commit ef6196028f966f22d82930b66e1371e75c5df2f7) Co-authored-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: GH:tiran
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/unixccompiler.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
index f0792de74a..d00c48981e 100644
--- a/Lib/distutils/unixccompiler.py
+++ b/Lib/distutils/unixccompiler.py
@@ -215,7 +215,8 @@ class UnixCCompiler(CCompiler):
return "-L" + dir
def _is_gcc(self, compiler_name):
- return "gcc" in compiler_name or "g++" in compiler_name
+ # clang uses same syntax for rpath as gcc
+ return any(name in compiler_name for name in ("gcc", "g++", "clang"))
def runtime_library_dir_option(self, dir):
# XXX Hackish, at the very least. See Python bug #445902: