File tree Expand file tree Collapse file tree 5 files changed +5
-81
lines changed Expand file tree Collapse file tree 5 files changed +5
-81
lines changed Original file line number Diff line number Diff line change @@ -28,26 +28,20 @@ import tempfile
28
28
from collections import namedtuple
29
29
from operator import attrgetter
30
30
31
+ from build_swift .build_swift import shell
32
+
31
33
import gyb
32
34
33
35
from jobstats import load_stats_dir , merge_all_jobstats
34
36
35
37
36
- def find_which (p ):
37
- for d in os .environ ["PATH" ].split (os .pathsep ):
38
- full = os .path .join (d , p )
39
- if os .path .isfile (full ) and os .access (full , os .X_OK ):
40
- return full
41
- return p
42
-
43
-
44
38
# Evidently the debug-symbol reader in dtrace is sufficiently slow and/or buggy
45
39
# that attempting to inject probes into a binary w/ debuginfo is asking for a
46
40
# failed run (possibly racing with probe insertion, or probing the stabs
47
41
# entries, see rdar://problem/7037927 or rdar://problem/11490861 respectively),
48
42
# so we sniff the presence of debug symbols here.
49
43
def has_debuginfo (swiftc ):
50
- swiftc = find_which (swiftc )
44
+ swiftc = shell . which (swiftc )
51
45
for line in subprocess .check_output (
52
46
["dwarfdump" , "--file-stats" , swiftc ]).splitlines ():
53
47
if '%' not in line :
Original file line number Diff line number Diff line change 15
15
#
16
16
# ----------------------------------------------------------------------------
17
17
18
- from .which import which
19
-
20
18
__all__ = [
21
19
"cmake" ,
22
20
"debug" ,
25
23
"tar" ,
26
24
"targets" ,
27
25
"toolchain" ,
28
- "which" ,
29
26
"xcrun" ,
30
27
]
Original file line number Diff line number Diff line change 18
18
19
19
import platform
20
20
21
+ from build_swift .build_swift .shell import which
22
+
21
23
from . import cache_util
22
24
from . import shell
23
25
from . import xcrun
24
- from .which import which
25
26
26
27
__all__ = [
27
28
'host_toolchain' ,
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments