[libcxx-commits] [libcxx] [libcxx] Make terminal check always false for `print` on GPU (PR #99259)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jul 31 07:13:45 PDT 2024
================
@@ -199,7 +199,7 @@ _LIBCPP_HIDE_FROM_ABI inline bool __is_terminal([[maybe_unused]] FILE* __stream)
// the behavior in the test. This is not part of the public API.
# ifdef _LIBCPP_TESTING_PRINT_IS_TERMINAL
return _LIBCPP_TESTING_PRINT_IS_TERMINAL(__stream);
-# elif _LIBCPP_AVAILABILITY_HAS_PRINT == 0
+# elif _LIBCPP_AVAILABILITY_HAS_PRINT == 0 || defined(_LIBCPP_TARGETING_GPU)
----------------
ldionne wrote:
IMO this isn't a proper way of disabling support for the terminal on GPUs. Instead, we should introduce a setting to control whether we have a terminal available -- that's a generally useful thing and in fact it would simplify some downstream diffs I've seen.
https://github.com/llvm/llvm-project/pull/99259
More information about the libcxx-commits
mailing list