https://llvm.org/bugs/show_bug.cgi?id=31408
Bug ID: 31408 Summary: /dev/null is not accepted as output Product: lld Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: All Bugs Assignee: unassignedb...@nondot.org Reporter: d...@golovin.in CC: llvm-bugs@lists.llvm.org Classification: Unclassified When detecting compiler features it is common to use '-o /dev/null' option. It fails with LLD. Typical test would look like this: $ echo 'typedef int x;' | clang -x c - -nostdlib -shared -o /dev/null ld.lld: error: rename failed: Permission denied So LLD is trying to rename /dev/null. What it is actually trying to do is the following: access("/dev/nulltmp4e940395", F_OK) = -1 ENOENT (No such file or directory) rename("/dev/null", "/dev/nulltmp4e940395") = -1 EACCES (Permission denied) I don't know what is the right behavior to implement if /dev/null is an output, but I think that is not it. This should also affect NUL on Windows. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs