[libcxx-commits] [libcxx] [libc++] use copy_file_range for fs::copy (PR #109211)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Dec 12 13:29:05 PST 2024
Jannik =?utf-8?q?Glückert?= <jannik.glueckert at gmail.com>,Louis Dionne
<ldionne.2 at gmail.com>,Louis Dionne <ldionne.2 at gmail.com>,Louis Dionne
<ldionne.2 at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/109211 at github.com>
ldionne wrote:
> Ugh, I forgot that Bionic does not provide a `copy_file_range` syscall wrapper. I guess checking for availability of the function at configure time like I did initially is the best option?
Can't you just check for `#ifdef __BIONIC__`? I'd like to avoid introducing any CMake coupling just to check that property.
>
> Also, there's still the issue that the no-locale build now fails due to use of `fstream`. Does libc++ have an internal locale-independent `fstream` I could use here? It'd be silly to drop `fs::copy_file` support from the no-locale build, but so is duplicating the old implementation which doesn't support `/proc` files
No, we don't have such a thing. Instead, I'd disable it for the no-localization build for now. I'm working on changes that should make `fstream` available even when localization is disabled, so that problem would be solved then.
https://github.com/llvm/llvm-project/pull/109211
More information about the libcxx-commits
mailing list