Enforce correct variant usage for rust_bindgen.
Modules defined in the srcs property are automatically added as dependencies with AddDependency(), which will use any variant available. This can cause incorrect architecture bindings to be silently pulled in, such as when a host module uses a rust_bindgen module that doesn't create a host variant. This moves populating depPaths.SrcDeps over to depsToPaths and adds a check for SourceProviders to make sure the correct OS and architecture is being used. Bug: 161826371 Test: Soong no longer silently pulls in bindings for the wrong target. Test: New Soong test to catch this case passes. Change-Id: I2b3651cf6fc7dabf4081434df1c455e637f5b3a4
Loading
Please register or sign in to comment