Skip to content

[NFC][Build System: build-script] Remove the old which module in swift_build_support. #29310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions utils/scale-test
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,20 @@ import tempfile
from collections import namedtuple
from operator import attrgetter

from build_swift.build_swift import shell

import gyb

from jobstats import load_stats_dir, merge_all_jobstats


def find_which(p):
for d in os.environ["PATH"].split(os.pathsep):
full = os.path.join(d, p)
if os.path.isfile(full) and os.access(full, os.X_OK):
return full
return p


# Evidently the debug-symbol reader in dtrace is sufficiently slow and/or buggy
# that attempting to inject probes into a binary w/ debuginfo is asking for a
# failed run (possibly racing with probe insertion, or probing the stabs
# entries, see rdar://problem/7037927 or rdar://problem/11490861 respectively),
# so we sniff the presence of debug symbols here.
def has_debuginfo(swiftc):
swiftc = find_which(swiftc)
swiftc = shell.which(swiftc)
for line in subprocess.check_output(
["dwarfdump", "--file-stats", swiftc]).splitlines():
if '%' not in line:
Expand Down
3 changes: 0 additions & 3 deletions utils/swift_build_support/swift_build_support/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
#
# ----------------------------------------------------------------------------

from .which import which

__all__ = [
"cmake",
"debug",
Expand All @@ -25,6 +23,5 @@
"tar",
"targets",
"toolchain",
"which",
"xcrun",
]
3 changes: 2 additions & 1 deletion utils/swift_build_support/swift_build_support/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@

import platform

from build_swift.build_swift.shell import which

from . import cache_util
from . import shell
from . import xcrun
from .which import which

__all__ = [
'host_toolchain',
Expand Down
42 changes: 0 additions & 42 deletions utils/swift_build_support/swift_build_support/which.py

This file was deleted.

26 changes: 0 additions & 26 deletions utils/swift_build_support/tests/test_which.py

This file was deleted.