Skip to content

Commit 22089ae

Browse files
authored
Revert "[flang][runtime] Enable I/O APIs in F18 runtime offload builds." (#87629)
Reverts #87543 The pre-merge Windows build is broken.
1 parent ff56584 commit 22089ae

File tree

8 files changed

+213
-235
lines changed

8 files changed

+213
-235
lines changed

flang/include/flang/Runtime/io-api.h

Lines changed: 82 additions & 82 deletions
Large diffs are not rendered by default.

flang/runtime/environment.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ static void SetEnvironmentDefaults(const EnvironmentDefaultList *envDefaults) {
4949
}
5050
}
5151

52-
RT_OFFLOAD_API_GROUP_BEGIN
5352
Fortran::common::optional<Convert> GetConvertFromString(
5453
const char *x, std::size_t n) {
5554
static const char *keywords[]{
@@ -69,7 +68,6 @@ Fortran::common::optional<Convert> GetConvertFromString(
6968
return Fortran::common::nullopt;
7069
}
7170
}
72-
RT_OFFLOAD_API_GROUP_END
7371

7472
void ExecutionEnvironment::Configure(int ac, const char *av[],
7573
const char *env[], const EnvironmentDefaultList *envDefaults) {

flang/runtime/environment.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ RT_OFFLOAD_VAR_GROUP_END
3131
// External unformatted I/O data conversions
3232
enum class Convert { Unknown, Native, LittleEndian, BigEndian, Swap };
3333

34-
RT_API_ATTRS Fortran::common::optional<Convert> GetConvertFromString(
34+
Fortran::common::optional<Convert> GetConvertFromString(
3535
const char *, std::size_t);
3636

3737
struct ExecutionEnvironment {

flang/runtime/freestanding-tools.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@
5252
#define STD_STRCPY_UNSUPPORTED 1
5353
#endif
5454

55-
#if !defined(STD_STRCMP_UNSUPPORTED) && \
56-
(defined(__CUDACC__) || defined(__CUDA__)) && defined(__CUDA_ARCH__)
57-
#define STD_STRCMP_UNSUPPORTED 1
58-
#endif
59-
6055
namespace Fortran::runtime {
6156

6257
#if STD_FILL_N_UNSUPPORTED
@@ -181,19 +176,5 @@ static inline RT_API_ATTRS char *strcpy(char *dest, const char *src) {
181176
using std::strcpy;
182177
#endif // !STD_STRCPY_UNSUPPORTED
183178

184-
#if STD_STRCMP_UNSUPPORTED
185-
// Provides alternative implementation for std::strcmp(), if
186-
// it is not supported.
187-
static inline RT_API_ATTRS int strcmp(const char *lhs, const char *rhs) {
188-
while (*lhs != '\0' && *lhs == *rhs) {
189-
++lhs;
190-
++rhs;
191-
}
192-
return static_cast<unsigned char>(*lhs) - static_cast<unsigned char>(*rhs);
193-
}
194-
#else // !STD_STRCMP_UNSUPPORTED
195-
using std::strcmp;
196-
#endif // !STD_STRCMP_UNSUPPORTED
197-
198179
} // namespace Fortran::runtime
199180
#endif // FORTRAN_RUNTIME_FREESTANDING_TOOLS_H_

0 commit comments

Comments
 (0)