Skip to content

Commit 39d6d96

Browse files
committed
FLANGRT -> FLANG_RT
1 parent 472893a commit 39d6d96

39 files changed

+124
-124
lines changed

flang-rt/CMakeLists.txt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
#===------------------------------------------------------------------------===#
1313

1414
set(LLVM_SUBPROJECT_TITLE "Fortran Runtime")
15-
set(FLANGRT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
16-
set(FLANGRT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
15+
set(FLANG_RT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
16+
set(FLANG_RT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
1717
set(FLANG_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../flang")
1818

1919

@@ -53,7 +53,7 @@ enable_language(Fortran)
5353

5454

5555
list(APPEND CMAKE_MODULE_PATH
56-
"${FLANGRT_SOURCE_DIR}/cmake/modules"
56+
"${FLANG_RT_SOURCE_DIR}/cmake/modules"
5757
"${FLANG_SOURCE_DIR}/cmake/modules"
5858
)
5959
include(AddFlangRT)
@@ -76,19 +76,19 @@ if (LLVM_TREE_AVAILABLE)
7676
# Despite Clang in the name, get_clang_resource_dir does not depend on Clang being added to the build
7777
# flang-new uses the same resource dir as clang.
7878
include(GetClangResourceDir)
79-
get_clang_resource_dir(FLANGRT_BUILD_LIB_DIR PREFIX "${LLVM_LIBRARY_OUTPUT_INTDIR}/.." SUBDIR "lib${LLVM_LIBDIR_SUFFIX}")
80-
get_clang_resource_dir(FLANGRT_INSTALL_LIB_DIR SUBDIR "lib${LLVM_LIBDIR_SUFFIX}") # No prefix, CMake's install command finds the install prefix itself
79+
get_clang_resource_dir(FLANG_RT_BUILD_LIB_DIR PREFIX "${LLVM_LIBRARY_OUTPUT_INTDIR}/.." SUBDIR "lib${LLVM_LIBDIR_SUFFIX}")
80+
get_clang_resource_dir(FLANG_RT_INSTALL_LIB_DIR SUBDIR "lib${LLVM_LIBDIR_SUFFIX}") # No prefix, CMake's install command finds the install prefix itself
8181
else ()
82-
set(FLANGRT_BUILD_LIB_DIR "${LLVM_LIBRARY_OUTPUT_INTDIR}")
83-
set(FLANGRT_INSTALL_LIB_DIR "lib${LLVM_LIBDIR_SUFFIX}")
82+
set(FLANG_RT_BUILD_LIB_DIR "${LLVM_LIBRARY_OUTPUT_INTDIR}")
83+
set(FLANG_RT_INSTALL_LIB_DIR "lib${LLVM_LIBDIR_SUFFIX}")
8484
endif ()
8585

8686
if (DEFINED WIN32)
87-
set(FLANGRT_BUILD_LIB_DIR "${FLANGRT_BUILD_LIB_DIR}/windows")
88-
set(FLANGRT_INSTALL_LIB_DIR "${FLANGRT_INSTALL_LIB_DIR}/windows")
87+
set(FLANG_RT_BUILD_LIB_DIR "${FLANG_RT_BUILD_LIB_DIR}/windows")
88+
set(FLANG_RT_INSTALL_LIB_DIR "${FLANG_RT_INSTALL_LIB_DIR}/windows")
8989
elseif (LLVM_ENABLE_PER_TARGET_RUNTIME_DIR)
90-
set(FLANGRT_BUILD_LIB_DIR "${FLANGRT_BUILD_LIB_DIR}/${LLVM_TARGET_TRIPLE}")
91-
set(FLANGRT_INSTALL_LIB_DIR "${FLANGRT_INSTALL_LIB_DIR}/${LLVM_TARGET_TRIPLE}")
90+
set(FLANG_RT_BUILD_LIB_DIR "${FLANG_RT_BUILD_LIB_DIR}/${LLVM_TARGET_TRIPLE}")
91+
set(FLANG_RT_INSTALL_LIB_DIR "${FLANG_RT_INSTALL_LIB_DIR}/${LLVM_TARGET_TRIPLE}")
9292
endif ()
9393

9494

@@ -153,9 +153,9 @@ if (WIN32)
153153
ERROR_QUIET
154154
)
155155
if (NOT CXX_COMPILER_PRINT_LIBGCC_PATH_FAILURE AND CXX_COMPILER_PRINT_LIBGCC_PATH_RESULT)
156-
string(STRIP "${CXX_COMPILER_PRINT_LIBGCC_PATH_RESULT}" FLANGRT_LIBCALL)
156+
string(STRIP "${CXX_COMPILER_PRINT_LIBGCC_PATH_RESULT}" FLANG_RT_LIBCALL)
157157
else ()
158-
set(FLANGRT_LIBCALL "")
158+
set(FLANG_RT_LIBCALL "")
159159
endif ()
160160
endif ()
161161

flang-rt/cmake/modules/AddFlangRT.cmake

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ function (add_flangrt_library name)
7777
endif ()
7878

7979
# Flang-rt's public headers
80-
target_include_directories(${name} PRIVATE "${FLANGRT_SOURCE_DIR}/include")
80+
target_include_directories(${name} PRIVATE "${FLANG_RT_SOURCE_DIR}/include")
8181

8282
# For ISO_Fortran_binding.h to be found by the runtime itself (Accessed as #include "flang/ISO_Fortran_binding.h")
8383
# User applications can use #include <ISO_Fortran_binding.h>
8484
target_include_directories(${name} PRIVATE "${FLANG_SOURCE_DIR}/include")
8585

8686
# For flang-rt's configured config.h to be found
87-
target_include_directories(${name} PRIVATE "${FLANGRT_BINARY_DIR}")
87+
target_include_directories(${name} PRIVATE "${FLANG_RT_BINARY_DIR}")
8888

8989
# Disable libstdc++/libc++ assertions, even in an LLVM_ENABLE_ASSERTIONS
9090
# build, to avoid an unwanted dependency on libstdc++/libc++.so.
@@ -98,8 +98,8 @@ function (add_flangrt_library name)
9898
# functions for 128-bit integer math (__udivti3, __modti3, __fixsfti,
9999
# __floattidf, ...) that msvc does not support. We are injecting a dependency
100100
# to Compiler-RT where these are implemented.
101-
if (MSVC AND (CMAKE_CXX_COMPILER_ID MATCHES ".*Clang") AND FLANGRT_LIBCALL)
102-
target_compile_options(${name} PRIVATE "$<$<COMPILE_LANGUAGE:CXX,C>:-Xclang>$<$<COMPILE_LANGUAGE:Fortran>:-Xflang>" "--dependent-lib=${FLANGRT_LIBCALL}")
101+
if (MSVC AND (CMAKE_CXX_COMPILER_ID MATCHES ".*Clang") AND FLANG_RT_LIBCALL)
102+
target_compile_options(${name} PRIVATE "$<$<COMPILE_LANGUAGE:CXX,C>:-Xclang>$<$<COMPILE_LANGUAGE:Fortran>:-Xflang>" "--dependent-lib=${FLANG_RT_LIBCALL}")
103103
endif ()
104104

105105
# Non-GTest unittests depend on LLVMSupport
@@ -119,15 +119,15 @@ function (add_flangrt_library name)
119119
if (ARG_INSTALL_WITH_TOOLCHAIN)
120120
set_target_properties(${name}
121121
PROPERTIES
122-
LIBRARY_OUTPUT_DIRECTORY "${FLANGRT_BUILD_LIB_DIR}"
123-
ARCHIVE_OUTPUT_DIRECTORY "${FLANGRT_BUILD_LIB_DIR}"
124-
RUNTIME_OUTPUT_DIRECTORY "${FLANGRT_BUILD_LIB_DIR}"
122+
LIBRARY_OUTPUT_DIRECTORY "${FLANG_RT_BUILD_LIB_DIR}"
123+
ARCHIVE_OUTPUT_DIRECTORY "${FLANG_RT_BUILD_LIB_DIR}"
124+
RUNTIME_OUTPUT_DIRECTORY "${FLANG_RT_BUILD_LIB_DIR}"
125125
)
126126

127127
install(TARGETS ${name}
128-
LIBRARY DESTINATION "${FLANGRT_INSTALL_LIB_DIR}"
129-
ARCHIVE DESTINATION "${FLANGRT_INSTALL_LIB_DIR}"
130-
RUNTIME DESTINATION "${FLANGRT_INSTALL_LIB_DIR}"
128+
LIBRARY DESTINATION "${FLANG_RT_INSTALL_LIB_DIR}"
129+
ARCHIVE DESTINATION "${FLANG_RT_INSTALL_LIB_DIR}"
130+
RUNTIME DESTINATION "${FLANG_RT_INSTALL_LIB_DIR}"
131131
)
132132
endif ()
133133

flang-rt/cmake/modules/AddFlangRTOffload.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ macro(enable_cuda_compilation name files)
5454
set_property(TARGET ${name}PTX PROPERTY CUDA_PTX_COMPILATION ON)
5555
if (FLANG_RT_CUDA_RUNTIME_PTX_WITHOUT_GLOBAL_VARS)
5656
target_compile_definitions(${name}PTX
57-
PRIVATE FLANGRT_NO_GLOBAL_VAR_DEFS
57+
PRIVATE FLANG_RT_NO_GLOBAL_VAR_DEFS
5858
)
5959
endif()
6060
endif()

flang-rt/include/flang-rt/CUDA/allocator.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#ifndef FLANGRT_CUDA_ALLOCATOR_H_
10-
#define FLANGRT_CUDA_ALLOCATOR_H_
9+
#ifndef FLANG_RT_CUDA_ALLOCATOR_H_
10+
#define FLANG_RT_CUDA_ALLOCATOR_H_
1111

1212
#include "flang/Runtime/descriptor-consts.h"
1313
#include "flang/Runtime/entry-names.h"
@@ -43,4 +43,4 @@ void *CUFAllocUnified(std::size_t);
4343
void CUFFreeUnified(void *);
4444

4545
} // namespace Fortran::runtime::cuda
46-
#endif /* FLANGRT_CUDA_ALLOCATOR_H_ */
46+
#endif /* FLANG_RT_CUDA_ALLOCATOR_H_ */

flang-rt/include/flang-rt/allocator-registry.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#ifndef FLANGRT_ALLOCATOR_REGISTRY_H_
10-
#define FLANGRT_ALLOCATOR_REGISTRY_H_
9+
#ifndef FLANG_RT_ALLOCATOR_REGISTRY_H_
10+
#define FLANG_RT_ALLOCATOR_REGISTRY_H_
1111

1212
#include "flang/Common/api-attrs.h"
1313
#include "flang/Runtime/allocator-registry-consts.h"
@@ -55,4 +55,4 @@ RT_OFFLOAD_VAR_GROUP_END
5555

5656
} // namespace Fortran::runtime
5757

58-
#endif /* FLANGRT_ALLOCATOR_REGISTRY_H_ */
58+
#endif /* FLANG_RT_ALLOCATOR_REGISTRY_H_ */

flang-rt/include/flang-rt/array-constructor.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
// External APIs to create temporary storage for array constructors when their
1010
// final extents or length parameters cannot be pre-computed.
1111

12-
#ifndef FLANGRT_ARRAY_CONSTRUCTOR_H_
13-
#define FLANGRT_ARRAY_CONSTRUCTOR_H_
12+
#ifndef FLANG_RT_ARRAY_CONSTRUCTOR_H_
13+
#define FLANG_RT_ARRAY_CONSTRUCTOR_H_
1414

1515
#include "flang-rt/descriptor.h"
1616
#include "flang/Runtime/array-constructor-consts.h"
@@ -45,4 +45,4 @@ struct ArrayConstructorVector {
4545
};
4646

4747
} // namespace Fortran::runtime
48-
#endif /* FLANGRT_ARRAY_CONSTRUCTOR_H_ */
48+
#endif /* FLANG_RT_ARRAY_CONSTRUCTOR_H_ */

flang-rt/include/flang-rt/descriptor.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#ifndef FLANGRT_DESCRIPTOR_H_
10-
#define FLANGRT_DESCRIPTOR_H_
9+
#ifndef FLANG_RT_DESCRIPTOR_H_
10+
#define FLANG_RT_DESCRIPTOR_H_
1111

1212
// Defines data structures used during execution of a Fortran program
1313
// to implement nontrivial dummy arguments, pointers, allocatables,
@@ -482,4 +482,4 @@ class alignas(Descriptor) StaticDescriptor {
482482
};
483483

484484
} // namespace Fortran::runtime
485-
#endif /* FLANGRT_DESCRIPTOR_H_ */
485+
#endif /* FLANG_RT_DESCRIPTOR_H_ */

flang-rt/include/flang-rt/io-api-funcs.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
// Defines API between compiled code and I/O runtime library.
1010

11-
#ifndef FLANGRT_IO_API_FUNCS_H_
12-
#define FLANGRT_IO_API_FUNCS_H_
11+
#ifndef FLANG_RT_IO_API_FUNCS_H_
12+
#define FLANG_RT_IO_API_FUNCS_H_
1313

1414
#include "flang/Common/uint128.h"
1515
#include "flang/Runtime/entry-names.h"
@@ -36,4 +36,4 @@ RT_API_ATTRS const char *InquiryKeywordHashDecode(
3636
char *buffer, std::size_t, InquiryKeywordHash);
3737

3838
} // namespace Fortran::runtime::io
39-
#endif /* FLANGRT_IO_API_FUNCS_H_ */
39+
#endif /* FLANG_RT_IO_API_FUNCS_H_ */

flang-rt/include/flang-rt/iostat-funcs.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
// Defines the values returned by the runtime for IOSTAT= specifiers
1010
// on I/O statements.
1111

12-
#ifndef FLANGRT_IOSTAT_FUNCS_H_
13-
#define FLANGRT_IOSTAT_FUNCS_H_
12+
#ifndef FLANG_RT_IOSTAT_FUNCS_H_
13+
#define FLANG_RT_IOSTAT_FUNCS_H_
1414

1515
#include "flang/Common/api-attrs.h"
1616
#include "flang/Runtime/iostat.h"
@@ -20,4 +20,4 @@ namespace Fortran::runtime::io {
2020
RT_API_ATTRS const char *IostatErrorString(int);
2121

2222
} // namespace Fortran::runtime::io
23-
#endif /* FLANGRT_IOSTAT_FUNCS_H_ */
23+
#endif /* FLANG_RT_IOSTAT_FUNCS_H_ */

flang-rt/include/flang-rt/memory.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
// Thin wrapper around malloc()/free() to isolate the dependency,
1010
// ease porting, and provide an owning pointer.
1111

12-
#ifndef FLANGRT_MEMORY_H_
13-
#define FLANGRT_MEMORY_H_
12+
#ifndef FLANG_RT_MEMORY_H_
13+
#define FLANG_RT_MEMORY_H_
1414

1515
#include "flang/Common/api-attrs.h"
1616
#include <cassert>
@@ -170,4 +170,4 @@ template <typename A> struct Allocator {
170170
};
171171
} // namespace Fortran::runtime
172172

173-
#endif /* FLANGRT_MEMORY_H_ */
173+
#endif /* FLANG_RT_MEMORY_H_ */

0 commit comments

Comments
 (0)