13 Commits

Author SHA1 Message Date
Ayush Ranjan 138e98fb7d nvproxy: Refactor DriverVersion out to nvconf package.
This allows for runsc to be able to use DriverVersion without having to depend
on the entirety of nvproxy.

PiperOrigin-RevId: 733912696
2025-03-05 16:43:03 -08:00
Anthony Cui 918a4d7089 Have driver_ast_parser report offset of record fields.
PiperOrigin-RevId: 660490627
2024-08-07 12:25:44 -07:00
Anthony Cui b96718ae17 Have driver_ast_parser track if a record is a union type.
PiperOrigin-RevId: 660480745
2024-08-07 12:01:30 -07:00
Anthony Cui d7d18541d3 Have driver_ast_parser report the size of structs and types.
PiperOrigin-RevId: 660453033
2024-08-07 10:55:09 -07:00
Anthony Cui 5017b6afc5 Add nvproxy test verifying that ABI struct names exist in the source code.
PiperOrigin-RevId: 657773809
2024-07-30 16:46:30 -07:00
Anthony Cui 81e0933827 Create Go tool for diffing Nvidia driver code using the Clang AST parser.
PiperOrigin-RevId: 657761554
2024-07-30 16:05:13 -07:00
Anthony Cui 3696e420bb Add helper code to set up and run the parser on a given driver version.
PiperOrigin-RevId: 657727841
2024-07-30 14:22:03 -07:00
Anthony Cui c671ffdf47 Have tool recurse through all structs and TypeDefs.
This is an improvement from just comparing the fields of top-level structs.
As a part of this, we handle anonymous records and arrays as well.

PiperOrigin-RevId: 657652481
2024-07-30 10:51:57 -07:00
Anthony Cui 392e838736 Don't pass file paths as strings.
Instead of passing file paths as strings, now pass os.File or directory paths
for compile_commands.json since it's always named that.

PiperOrigin-RevId: 657349644
2024-07-29 15:44:00 -07:00
Anthony Cui 2826d8faa6 Add missing struct source files.
PiperOrigin-RevId: 656112382
2024-07-25 15:23:29 -07:00
Anthony Cui 91270b8427 Add code to search and generate the necessary include files for the Clang tool.
PiperOrigin-RevId: 655691975
2024-07-24 14:04:56 -07:00
Anthony Cui 842894d1c6 Generate necessary config files for the Clang tool on the Go side.
PiperOrigin-RevId: 655682520
2024-07-24 13:37:00 -07:00
Anthony Cui a5d0c68db5 Add struct definitions from the Clang tool to the Go side.
PiperOrigin-RevId: 655623963
2024-07-24 10:51:16 -07:00