Skip to content

Commit f43a56e

Browse files
committed
Preprocessor names must be the same for LLVM_ENABLE_RUNTIMES=flang-rt and FLANG_INCLUDE_RUNTIME=ON
1 parent b02f47d commit f43a56e

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

flang-rt/cmake/modules/AddFlangRTOffload.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ macro(enable_cuda_compilation name files)
4848
# Apply configuration options
4949
if (FLANG_RT_CUDA_RUNTIME_PTX_WITHOUT_GLOBAL_VARS)
5050
target_compile_definitions(obj.${name}PTX
51-
PRIVATE FLANG_RT_NO_GLOBAL_VAR_DEFS
51+
PRIVATE FLANG_RUNTIME_NO_GLOBAL_VAR_DEFS
5252
)
5353
endif()
5454

flang-rt/lib/flang_rt/allocator-registry.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111

1212
namespace Fortran::runtime {
1313

14-
#ifndef FLANG_RT_NO_GLOBAL_VAR_DEFS
14+
#ifndef FLANG_RUNTIME_NO_GLOBAL_VAR_DEFS
1515
RT_OFFLOAD_VAR_GROUP_BEGIN
1616
RT_VAR_ATTRS AllocatorRegistry allocatorRegistry;
1717
RT_OFFLOAD_VAR_GROUP_END
18-
#endif // FLANG_RT_NO_GLOBAL_VAR_DEFS
18+
#endif // FLANG_RUNTIME_NO_GLOBAL_VAR_DEFS
1919

2020
RT_OFFLOAD_API_GROUP_BEGIN
2121
RT_API_ATTRS void AllocatorRegistry::Register(int pos, Allocator_t allocator) {

flang-rt/lib/flang_rt/environment.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ extern char **environ;
2323

2424
namespace Fortran::runtime {
2525

26-
#ifndef FLANG_RT_NO_GLOBAL_VAR_DEFS
26+
#ifndef FLANG_RUNTIME_NO_GLOBAL_VAR_DEFS
2727
RT_OFFLOAD_VAR_GROUP_BEGIN
2828
RT_VAR_ATTRS ExecutionEnvironment executionEnvironment;
2929
RT_OFFLOAD_VAR_GROUP_END
30-
#endif // FLANG_RT_NO_GLOBAL_VAR_DEFS
30+
#endif // FLANG_RUNTIME_NO_GLOBAL_VAR_DEFS
3131

3232
static void SetEnvironmentDefaults(const EnvironmentDefaultList *envDefaults) {
3333
if (!envDefaults) {

flang-rt/lib/flang_rt/unit.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919

2020
namespace Fortran::runtime::io {
2121

22-
#ifndef FLANG_RT_NO_GLOBAL_VAR_DEFS
22+
#ifndef FLANG_RUNTIME_NO_GLOBAL_VAR_DEFS
2323
RT_OFFLOAD_VAR_GROUP_BEGIN
2424
RT_VAR_ATTRS ExternalFileUnit *defaultInput{nullptr}; // unit 5
2525
RT_VAR_ATTRS ExternalFileUnit *defaultOutput{nullptr}; // unit 6
2626
RT_VAR_ATTRS ExternalFileUnit *errorOutput{nullptr}; // unit 0 extension
2727
RT_OFFLOAD_VAR_GROUP_END
28-
#endif // FLANG_RT_NO_GLOBAL_VAR_DEFS
28+
#endif // FLANG_RUNTIME_NO_GLOBAL_VAR_DEFS
2929

3030
RT_OFFLOAD_API_GROUP_BEGIN
3131

flang-rt/lib/flang_rt/utf.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
namespace Fortran::runtime {
1212

13-
#ifndef FLANG_RT_NO_GLOBAL_VAR_DEFS
13+
#ifndef FLANG_RUNTIME_NO_GLOBAL_VAR_DEFS
1414
// clang-format off
1515
RT_OFFLOAD_VAR_GROUP_BEGIN
1616
const RT_CONST_VAR_ATTRS std::uint8_t UTF8FirstByteTable[256]{
@@ -41,7 +41,7 @@ const RT_CONST_VAR_ATTRS std::uint8_t UTF8FirstByteTable[256]{
4141
};
4242
RT_OFFLOAD_VAR_GROUP_END
4343
// clang-format on
44-
#endif // FLANG_RT_NO_GLOBAL_VAR_DEFS
44+
#endif // FLANG_RUNTIME_NO_GLOBAL_VAR_DEFS
4545

4646
RT_OFFLOAD_API_GROUP_BEGIN
4747

0 commit comments

Comments
 (0)