mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 12:26:52 +08:00
[compiler-rt][ASAN] Replace find_executable with shtuil.which in script
distutils is deprecated and shutil.which is the suggested replacement for this function. https://peps.python.org/pep-0632/#migration-advice https://docs.python.org/3/library/shutil.html#shutil.which which was added in 3.3 (https://docs.python.org/3/library/shutil.html#shutil.which) and LLVM requires at least 3.6 (https://llvm.org/docs/GettingStarted.html#software). Reviewed By: delcypher, vitalybuka Differential Revision: https://reviews.llvm.org/D148528
This commit is contained in:
@@ -26,9 +26,9 @@ import getopt
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
from distutils.spawn import find_executable
|
||||
|
||||
symbolizers = {}
|
||||
demangle = False
|
||||
@@ -155,7 +155,7 @@ class Addr2LineSymbolizer(Symbolizer):
|
||||
addr2line_tool = 'addr2line'
|
||||
if binutils_prefix:
|
||||
addr2line_tool = binutils_prefix + addr2line_tool
|
||||
logging.debug('addr2line binary is %s' % find_executable(addr2line_tool))
|
||||
logging.debug('addr2line binary is %s' % shutil.which(addr2line_tool))
|
||||
cmd = [addr2line_tool, '-fi']
|
||||
if demangle:
|
||||
cmd += ['--demangle']
|
||||
|
||||
Reference in New Issue
Block a user