[libc++] Android temp dir is /data/local/tmp, enable Windows test
[libc++] Android temp dir is /data/local/tmp, enable Windows test On Android, std::filesystem::temp_directory_path() should fall back to /data/local/tmp when no environment variable is set. There is no /tmp directory. Most apps can't access /data/local/tmp, but they do have a "cache dir" (Context#getCacheDir()) that is usable for temporary files. However, there is no obvious and reliable way for libc++ to query this directory in contexts where it is available. The global fallback /data/local/tmp is available for "adb shell", making it useful for test suites. On Windows, temp_directory_path falls back to the Windows directory (e.g. "C:\Windows"), so call GetWindowsDirectoryW to do the test. Reviewed By: ldionne, #libc, enh Differential Revision: https://reviews.llvm.org/D137131
Loading
Please sign in to comment