Enable cross-directory ccache#1539
Conversation
Marsella8
left a comment
There was a problem hiding this comment.
From my very limited understanding of nix, everything seems good.
Reviewed 7 of 8 files at r1, all commit messages.
Reviewable status: 7 of 8 files reviewed, 2 unresolved discussions (waiting on @lockshaw and @reyna-abhyankar)
.flake/pkgs/ffdb/default.nix line 32 at r1 (raw file):
python3 ]} cp $out/bin/gdb $out/bin/ffdb
so this effectively auto-executes ffdb.py before every gdb call right?
.flake/pkgs/ffdb/ffdb.py line 9 at r1 (raw file):
gdb.execute('set history save on') # python
The commented out code should either be deleted or updated? (e.g. MachineViewPrinter still refers to the old interface).
lockshaw
left a comment
There was a problem hiding this comment.
Reviewable status: 6 of 8 files reviewed, 2 unresolved discussions (waiting on @Marsella8 and @reyna-abhyankar)
.flake/pkgs/ffdb/default.nix line 32 at r1 (raw file):
Previously, Marsella8 wrote…
so this effectively auto-executes ffdb.py before every gdb call right?
Correct
.flake/pkgs/ffdb/ffdb.py line 9 at r1 (raw file):
Previously, Marsella8 wrote…
The commented out code should either be deleted or updated? (e.g.
MachineViewPrinterstill refers to the old interface).
Done.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1539 +/- ##
=========================================
Coverage ? 78.50%
=========================================
Files ? 867
Lines ? 28904
Branches ? 778
=========================================
Hits ? 22690
Misses ? 6214
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. |
Description of changes:
The current ccache setup is very limited in its ability to cache between directories due to the fact that the compiler-generated debug info and any
__FILE__macros cause builds to differ between directories, which is quite annoying if you are using ff-dev and would like to quicklyffprdown a PR and build it as you end up building from scratch. This PR adds the necessary compiler flags to make debug info and__FILE__macros use relative paths, and then adds a wrapper around gdb that ensures that the debugging experience isn't affected (the only limitation is that you have to be running the debugger inside the nix environment, which you essentially have to do anyway).Related Issues:
Linked Issues:
Issues closed by this PR:
This change is