Skip to content

DRAFT: remove llvm-bolt-wrapper logic from nfc setup #146209

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
15 changes: 2 additions & 13 deletions bolt/utils/nfc-check-setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ def main():
description=textwrap.dedent(
"""
This script builds two versions of BOLT (with the current and
previous revision) and sets up symlink for llvm-bolt-wrapper.
Passes the options through to llvm-bolt-wrapper.
previous revision).
"""
)
)
Expand All @@ -76,7 +75,7 @@ def main():
default="HEAD^",
help="Revision to checkout to compare vs HEAD",
)
args, wrapper_args = parser.parse_known_args()
args = parser.parse_args()
bolt_path = f"{args.build_dir}/bin/llvm-bolt"

source_dir = None
Expand All @@ -90,7 +89,6 @@ def main():
sys.exit("Source directory is not found")

script_dir = os.path.dirname(os.path.abspath(__file__))
wrapper_path = f"{script_dir}/llvm-bolt-wrapper.py"
# build the current commit
subprocess.run(
shlex.split("cmake --build . --target llvm-bolt"), cwd=args.build_dir
Expand Down Expand Up @@ -131,15 +129,6 @@ def main():
)
# rename llvm-bolt
os.replace(bolt_path, f"{bolt_path}.old")
# set up llvm-bolt-wrapper.ini
ini = subprocess.check_output(
shlex.split(f"{wrapper_path} {bolt_path}.old {bolt_path}.new") + wrapper_args,
text=True,
)
with open(f"{args.build_dir}/bin/llvm-bolt-wrapper.ini", "w") as f:
f.write(ini)
# symlink llvm-bolt-wrapper
os.symlink(wrapper_path, bolt_path)
if args.switch_back:
if stash:
subprocess.run(shlex.split("git stash pop"), cwd=source_dir)
Expand Down
Loading