mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Improve build_with_deb_info (#138290)
To skip over the command that do not have output file specified Recently I've noticed that `generate_torch_version.py` started to run on every rebuild, and this results in a failed plan for deb info rebuilds Pull Request resolved: https://github.com/pytorch/pytorch/pull/138290 Approved by: https://github.com/Skylion007
This commit is contained in:
committed by
PyTorch MergeBot
parent
4e9273c84e
commit
ea8ea2f33f
@ -78,8 +78,11 @@ def create_build_plan() -> list[tuple[str, str]]:
|
||||
if line.startswith(": &&") and line.endswith("&& :"):
|
||||
line = line[4:-4]
|
||||
line = line.replace("-O2", "-g").replace("-O3", "-g")
|
||||
name = line.split("-o ", 1)[1].split(" ")[0]
|
||||
rc.append((name, line))
|
||||
try:
|
||||
name = line.split("-o ", 1)[1].split(" ")[0]
|
||||
rc.append((name, line))
|
||||
except IndexError:
|
||||
print(f"Skipping {line} as it does not specify output file")
|
||||
return rc
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user