Skip to content

Commit

Permalink
Change configure.py --max-errors default to 1 (doldecomp#1376)
Browse files Browse the repository at this point in the history
  • Loading branch information
ribbanya authored Mar 6, 2024
1 parent 5004335 commit 49b9f81
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"--use-asm",
dest="no_asm",
action="store_false",
help="don't incorporate .s files from asm directory",
help="incorporate .s files from asm directory",
)
parser.add_argument(
"--debug",
Expand Down Expand Up @@ -108,12 +108,12 @@
"--msg-style",
choices=["mpw", "std", "gcc", "ide", "parseable"],
default="std",
help="message style of the compiler (default 'std')",
help="message style of the compiler and linker (default 'std')",
)
parser.add_argument(
"--max-errors",
type=int,
default=0,
default=1,
help="the maximum number of errors allowed by the compiler (default 0, meaning unlimited)",
)
parser.add_argument(
Expand Down Expand Up @@ -209,17 +209,13 @@
else:
cflags_base.append("-DNDEBUG=1")

if args.max_errors is not None:
cflags_base.append(f"-maxerrors {args.max_errors}")
if args.max_errors == 0:
cflags_base.append("-nofail")
cflags_base.append(f"-maxerrors {args.max_errors}")
if args.max_errors == 0:
cflags_base.append("-nofail")

if args.msg_style is not None:
cflags_base.append(f"-msgstyle {args.msg_style}")
config.ldflags.append(f"-msgstyle {args.msg_style}")

if args.warn is not None:
cflags_base.append(f"-warn {args.warn}")
cflags_base.append(f"-msgstyle {args.msg_style}")
config.ldflags.append(f"-msgstyle {args.msg_style}")
cflags_base.append(f"-warn {args.warn}")

if args.warn_error:
cflags_base.append("-warn iserror")
Expand Down

0 comments on commit 49b9f81

Please sign in to comment.