aboutsummaryrefslogtreecommitdiffstats
path: root/sys/fuchsia/fidlgen
Commit message (Collapse)AuthorAgeFilesLines
* pkg/ifuzz: fix generate/buildDmitry Vyukov2025-04-031-1/+1
| | | | | | | Currently the commands we have in go:generate first create an empty file and then write final contents. This breaks any parallel builds of the source. Even running go generate ./... does not work. Write output files atomically.
* Makefile: simplify Go generationDmitry Vyukov2025-04-021-6/+9
| | | | | | Make fidlgen non special and run go generate for all packages. This will avoid stale go:generate commands, and missed packages (like we had for pkg/ifuzz/{x86,arm64} for years).
* all: use tool.Failf instead of local functionsDmitry Vyukov2020-12-251-13/+9
|
* sys/targets: add OS/Arch name constsDmitry Vyukov2020-10-261-1/+1
| | | | | | | | | | | | We use strings to identify OS/Arch. These strings are duplicated throughout the code base massively. golangci-lint points to possiblity of typos and duplication. We already had to define these names in pkg/csource and disable checking for prog package. A future change triggers such warnings in another package. Add OS/Arch name consts to sys/targets so that they can be used to refer to OS/Arch. Use the consts everywhere.
* all: fix dup types in func argsDmitry Vyukov2020-07-041-1/+1
|
* sys/fuchsia: update "make extract" support codeMatthew Dempsky2020-06-051-6/+7
| | | | | | | FIDL fuzzing hasn't been working for a while, and it's further bit-rotted as upstream FIDL functionality has continued to evolve. This commit updates enough FIDL functionality to get a minimal FIDL test case to work again.
* sys: Updating Fuchsia extraction scriptsPascal Perez2019-05-211-58/+11
| | | | | | | | | Consolidating FIDL library build mappings in one place, so that it can be used from extraction, and script invoking fidlgen. This also makes code clearer, and provides a more natural path for evolutions / dealing with oddities. Minor doc update post fx command changes.
* sys/fuchsia/fidlgen: update FIDL path & extract new descriptionsJulia Hansbrough2019-02-211-8/+18
| | | | | | | | Garnet-layer FIDL descriptions are in a new subdirectory. This CL changes it to the proper directory, and performed a "make extract" shortly after. This should fix some of the errors on the Syzkaller hub.
* sys/fuchsia: fix fidlgen issuesMarco Vanotti2019-02-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * sys/fuchsia: fix fidlgen issues. This change modifies fidlgen removing fuchsia.mediacodec and renaming zircon-ethernet to fuchsia-hardware-ethernet. fuchsia.mediacodec has most of its functionality merged into fuchsia.media and it's not included in the default amd64 builds. zircon-ethernet has been renamed to fuchsia-hardware-ethernet recently: https://fuchsia-review.googlesource.com/c/zircon/+/237178 * docs/fuchsia: Add troubleshooting sections This commit adds a troubleshooting section in the fuchsia syzkaller docs that mentions how to solve fidlgen issues when fidl interfaces are removed or renamed. * sys/fuchsia: remove stale autogenerated files. * sys/fucsia run make extract && make generate.
* pkg/compiler: add error handler in CollectUnusedMarco Vanotti2018-11-211-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pkg/compiler: Add error handler in `CollectUnused`. This commit adds an error handler for the `CollectUnused` function. The error handler just panics on any error, but is useful for debugging. The error handler is used any time `comp` finds an error, and if it's missing, it will panic due to a `nil` pointer dereference. At least now we get a better understanding of the errors. The only user of `CollectUnused` is `sys/fuchsia/fidlgen`, which is failing now and will be fixed in a future commit. The output message looks like this: ``` panic: could not collect unused nodes. fidl_net-stack.txt:110:15: unknown type zx_chan_zircon_ethernet_Device_client ``` * pkg/compiler Better error handling in CollectUnused This commit changes the default error handler for compiler to `ast.LoggingHandler`, meaning that if `nil` is passed as an error handler, `LoggingHandler` will be used instead. `CollectUnused` now returns an error if any of the subfunctions produce errors. `fidlgen` is the only caller of `CollectUnused`, and now checks for errors as well. * pkg/compiler Add tests for CollectUnused This commit adds basic tests for the CollectUnused function. There's one test that checks that it returns the right nodes, and another one that makes sure that it returns errors when needed. To make the test clearer, I had to add the error handler as an explicit parameter in `CollectUnunsed`, instead of using the default one. This avoid printing garbage in the logs. The `TestCollectUnusedError` function uses a nopErrorHandler to avoid printing anything. * pkg/compiler fix presubmit warnings
* sys/fuchsia: add zircon-ethernet to fidlgen libsMarco Vanotti2018-11-211-0/+1
| | | | | | | | | | | | | | | | | This commits adds "zircon-ethernet" to the list of fidl libraries that fidlgen would look at. This is required because recently, a change in fuchsia[0] added a new method to the netstack interface, that allows for adding an EthernetInterface. One of the parameters is a zircon.ethernet.Device, so we need to import that type for fidlgen to be able to understand fidl_net-stack.txt. I tested this by running: ```shell $ make extract TARGETOS=fuchsia SOURCEDIR=${FUCHSIADIR} $ make generate ``` [0]: https://fuchsia-review.googlesource.com/c/zircon/+/220580
* Include generate_fidl as part of the `extract` step.Julia Hansbrough2018-10-021-1/+1
| | | | | | | | | | | Anytime we're running `make extract/generate` with Fuchsia as a target, we probably want to update FIDL descriptions too, so we don't fall behind what upstream is up to. This includes generate_fidl as part of the `make extract` workflow. Also, corrects fidlgenPath to properly find the path for ARM targets (we only have host_x64 right now).
* sys/fuchsia: add description for fuchsia.net, .net-stack, .ldsvc servicesDokyung Song2018-09-141-0/+3
|
* sys/fuchsia: generate descriptions for garnet servicesDokyung Song2018-09-121-25/+55
|
* sys/fuchsia: prune unused structs in syscall description generated by fidlgenDokyung Song2018-09-111-1/+40
| | | | | | | | After generating syscall description for fidl files using fidlgen, prune all unused structs using the exact same mechanism used by the compiler's check for unused structs. This allows the FIDL compiler to support modular compilation; it does not need to have global knowledge of whether each struct is used or not.
* sys/fuchsia: add Go script that generates fidl descriptionsDokyung Song2018-09-061-0/+78