For some reason, sometimes the typemap*.ll files are sometimes removed from the obj/ directory which leads to build errors similar to:
typemaps.x86_64.ll: error: Could not open input file: no such file or directory
Files are generated by the GenerateJavaStubs tasks, which is invoked by the _GenerateJavaStubs target. However, the target doesn't specify the *.ll files in its Outputs parameter and, therefore, whenever the files are removed but the _GenerateJavaStubs.stamp file is newer than the items/files specified in the target's Inputs parameter, the native assembly files aren't regenerated leading to the above error.
To fix this, we need to add the typemap*.ll files to the target's Outputs set, thus forcing their regeneration should they be no longer where they are expected to be.
Fixes: https://github.com/xamarin/xamarin-android/issues/8967
For some reason, sometimes the
typemap*.ll
files are sometimes removed from theobj/
directory which leads to build errors similar to:Files are generated by the
GenerateJavaStubs
tasks, which is invoked by the_GenerateJavaStubs
target. However, the target doesn't specify the*.ll
files in itsOutputs
parameter and, therefore, whenever the files are removed but the_GenerateJavaStubs.stamp
file is newer than the items/files specified in the target'sInputs
parameter, the native assembly files aren't regenerated leading to the above error.To fix this, we need to add the
typemap*.ll
files to the target'sOutputs
set, thus forcing their regeneration should they be no longer where they are expected to be.