Skip to content

Commit 40faf09

Browse files
committed
[libcxx] Make terminal check always false for print on GPU
Summary: This check must be handled in order to compile. The GPU cannot easily determine if a given `FILE *` is a terminal because the `stdio` interface is actually a wrapper over the system's `FILE *`, so we can't really detect it easily. An RPC call could be made to `isatty` if we really need to support this in the future.
1 parent b15d7ed commit 40faf09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/include/print

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ _LIBCPP_HIDE_FROM_ABI inline bool __is_terminal([[maybe_unused]] FILE* __stream)
199199
// the behavior in the test. This is not part of the public API.
200200
# ifdef _LIBCPP_TESTING_PRINT_IS_TERMINAL
201201
return _LIBCPP_TESTING_PRINT_IS_TERMINAL(__stream);
202-
# elif _LIBCPP_AVAILABILITY_HAS_PRINT == 0
202+
# elif _LIBCPP_AVAILABILITY_HAS_PRINT == 0 || defined(_LIBCPP_TARGETING_GPU)
203203
return false;
204204
# elif defined(_LIBCPP_WIN32API)
205205
return std::__is_windows_terminal(__stream);

0 commit comments

Comments
 (0)