You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-18Lines changed: 24 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,10 +16,11 @@ See [Usage](#usage) for more information.
16
16
17
17
## Usage
18
18
19
-
objdiff works by comparing two relocatable object files (`.o`). The objects are expected to have the same relative path from the "target" and "base" directories.
19
+
objdiff works by comparing two relocatable object files (`.o`). The objects are expected to have the same relative path
20
+
from the "target" and "base" directories.
20
21
21
-
For example, if the target ("expected") object is located at `build/asm/MetroTRK/mslsupp.o` and the base ("actual") object
22
-
is located at `build/src/MetroTRK/mslsupp.o`, the following configuration would be used:
22
+
For example, if the target ("expected") object is located at `build/asm/MetroTRK/mslsupp.o` and the base ("actual")
23
+
object is located at `build/src/MetroTRK/mslsupp.o`, the following configuration would be used:
23
24
24
25
- Target build directory: `build/asm`
25
26
- Base build directory: `build/src`
@@ -38,14 +39,19 @@ See [Configuration](#configuration) for more information.
38
39
39
40
## Configuration
40
41
41
-
While **not required** (most settings can be specified in the UI), projects can add an `objdiff.json` (or `objdiff.yaml`, `objdiff.yml`) file to configure the tool automatically. The configuration file must be located in the root project directory.
42
+
While **not required** (most settings can be specified in the UI), projects can add an `objdiff.json` (or
43
+
`objdiff.yaml`, `objdiff.yml`) file to configure the tool automatically. The configuration file must be located in
44
+
the root project directory.
45
+
46
+
If your project has a generator script (e.g. `configure.py`), it's recommended to generate the objdiff configuration
47
+
file as well. You can then add `objdiff.json` to your `.gitignore` to prevent it from being committed.
42
48
43
49
```json5
44
50
// objdiff.json
45
51
{
46
52
"custom_make":"ninja",
47
-
"target_dir":"build/mp1.0/asm",
48
-
"base_dir":"build/mp1.0/src",
53
+
"target_dir":"build/asm",
54
+
"base_dir":"build/src",
49
55
"build_target":true,
50
56
"watch_patterns": [
51
57
"*.c",
@@ -72,18 +78,19 @@ While **not required** (most settings can be specified in the UI), projects can
72
78
These are the **intended result** of the match.
73
79
-`base_dir`: Relative from the root of the project, this is where the "base" or "actual" objects are located.
74
80
These are objects built from the **current source code**.
75
-
-`build_target`: If true, objdiff will tell the build system to build the target objects before diffing (e.g. `make path/to/target.o`).
76
-
This is useful if the target objects are not built by default or can change based on project configuration or edits to assembly files.
81
+
-`build_target`: If true, objdiff will tell the build system to build the target objects before diffing (e.g.
82
+
`make path/to/target.o`).
83
+
This is useful if the target objects are not built by default or can change based on project configuration or edits
84
+
to assembly files.
77
85
Requires the build system to be configured properly.
78
-
-`watch_patterns`_(optional)_: A list of glob patterns to watch for changes. ([Supported syntax](https://docs.rs/globset/latest/globset/#syntax))
86
+
-`watch_patterns`_(optional)_: A list of glob patterns to watch for changes.
0 commit comments