Closed
Description
Reported by Raphael Nestler at: https://rust-for-linux.zulipchat.com/#narrow/stream/291565-Help/topic/Out.20of.20tree.20module.20for.20mainline.20kernel/near/367742473
rustc
outputs by default the temporary files (i.e. the ones saved by -Csave-temps
, such as *.rcgu*
files) in the current working directory when -o
and --out-dir
are not given (even if --emit=x=path
is given, i.e. it does not use those for temporaries).
Since out-of-tree modules are compiled from the linux
tree, rustc
then tries to create them there, which may not be accessible.
Passing --out-dir
explicitly, even if it is just for the temporary files, should solve it.