std: Make copy_file_range checks run at compile-time

* Avoid emitting the copy_file_range symbol at all to prevent link-time
  errors.
* Fix a bug in the check logic, the has_copy_file_range_syscall was
  set to the wrong value in case of ENOSYS
* If link_libc is true don't fall-back to the raw syscall approach,
  there's no policy about what to do in this case but let's follow what
  the other impls do.

Fixes #9146
b72d55ea5fLemonBoy committed on 6/20/2021, 11:54:39 PM· committed by Andrew Kelleyparentc7dd3cc
1 file changedLine totals unavailable