microsoft / igvm

MIT License
81 stars 17 forks source link

igvm_c: Fix linker issues with sample and tests and clean up output #31

Closed roy-hopkins closed 4 months ago

roy-hopkins commented 4 months ago

It was reported on https://github.com/coconut-svsm/svsm/pull/237 that on certain environments, the C unit tests and sample fail to build due to missing library dependencies. Also, the status of the build is hard to determine due to the amount of warnings generated by cbindgen. See the comment thread in that PR from @cclaudio.

The required list of libraries can be determined with the following command:

cargo rustc --verbose --features "igvm-c" --manifest-path=igvm/Cargo.toml -- --print=native-static-libs

This PR updates the Makefile to reflect the output of this command. In addition, the cbindgen -q flag is used to suppress warnings - it would be good to fix the warnings but this would require the generation of redundant additional output in the header files which is not ideal.

Finally, add a section to the README to describe how to install the library.

chris-oo commented 4 months ago

LGTM, I'll merge it.