Skip to content

Commit

Permalink
bpo-45371: Fix distutils' rpath support for clang (GH-28732)
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Heimes <christian@python.org>
  • Loading branch information
tiran committed Oct 5, 2021
1 parent 07cf10b commit ef61960
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Lib/distutils/unixccompiler.py
Expand Up @@ -215,7 +215,8 @@ def library_dir_option(self, dir):
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:
Expand Down
@@ -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.

0 comments on commit ef61960

Please sign in to comment.