mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
bpo-45371: Fix distutils' rpath support for clang (GH-28732)
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit ef6196028f
)
Co-authored-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
7c2a040a10
commit
3ce5e07e9a
2 changed files with 5 additions and 1 deletions
|
@ -215,7 +215,8 @@ class UnixCCompiler(CCompiler):
|
||||||
return "-L" + dir
|
return "-L" + dir
|
||||||
|
|
||||||
def _is_gcc(self, compiler_name):
|
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):
|
def runtime_library_dir_option(self, dir):
|
||||||
# XXX Hackish, at the very least. See Python bug #445902:
|
# XXX Hackish, at the very least. See Python bug #445902:
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
Fix clang rpath issue in :mod:`distutils`. The UnixCCompiler now uses
|
||||||
|
correct clang option to add a runtime library directory (rpath) to a shared
|
||||||
|
library.
|
Loading…
Add table
Add a link
Reference in a new issue