diff options
| author | Roman971 <32455037+Roman971@users.noreply.github.com> | 2020-07-19 21:42:05 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-19 15:42:05 -0400 |
| commit | 3d36fe510f23a2f2072ab96c5b74b0bd15860e56 (patch) | |
| tree | aad4fa044d00495ac4d7bcf77f02085893b14c14 /first_diff.py | |
| parent | 15038468acfbf431d9aab693f0e5058bbe5f2c8c (diff) | |
Add COMPARE and NON_MATCHING build options (#275)
* Add COMPARE and NON_MATCHING build options
* Add a -m/--make option to first_diff.py
* Minor comment update
Diffstat (limited to 'first_diff.py')
| -rwxr-xr-x | first_diff.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/first_diff.py b/first_diff.py index 776d902ff..fff96557a 100755 --- a/first_diff.py +++ b/first_diff.py @@ -24,10 +24,16 @@ parser.add_argument( const="prompt", help="run diff.py on the result with the provided arguments" ) +parser.add_argument( + "-m", "--make", help="run make before finding difference(s)", action="store_true" +) args = parser.parse_args() diff_count = args.count +if args.make: + check_call(["make", "-j4", "COMPARE=0"]) + baseimg = f"baserom.z64" basemap = f"expected/build/z64.map" @@ -228,6 +234,10 @@ if diffs > 100: print(f"No ROM shift{' (!?)' if definite_shift else ''}") if args.diff_args: + if len(found_instr_diff) < 1: + print(f"No instruction difference to run diff.py on") + exit() + diff_sym = search_rom_address(found_instr_diff[0]).split()[0] if args.diff_args == "prompt": diff_args = input("Call diff.py with which arguments? ") or "--" |
