ruiu added a comment. If you are suggesting we emit something like "cannot open file for -R: foo/bar is a directory. Did you mean -rpath?" for -R, I think I'd agree that that is probably better than just emitting an error without the hint. https://reviews.llvm.org/D40558