Skip to content
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

Added --clean flag to fusesoc run command #706

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
9 changes: 7 additions & 2 deletions fusesoc/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ def run(fs, args):
exit(1)

# Unconditionally clean out the work root on fresh builds
# if we use the old tool API
if do_configure and not core.get_flow(flags):
# if we use the old tool API or clean flag is set
if do_configure and (not core.get_flow(flags) or args.clean):
try:
prepare_work_root(fs.get_work_root(core, flags))
except RuntimeError as e:
Expand Down Expand Up @@ -568,6 +568,11 @@ def get_parser():

# run subparser
parser_run = subparsers.add_parser("run", help="Start a tool flow")
parser_run.add_argument(
"--clean",
action="store_true",
help="Clean build directory on start",
)
parser_run.add_argument(
"--no-export",
action="store_true",
Expand Down