Skip to content

Commit f97c774

Browse files
committed
build fixes
1 parent c86aa90 commit f97c774

File tree

21 files changed

+113
-109
lines changed

21 files changed

+113
-109
lines changed

clang/lib/Driver/ToolChains/CommonArgs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1330,7 +1330,7 @@ void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args,
13301330
F128LibName.consume_front_insensitive("lib");
13311331
if (!F128LibName.empty()) {
13321332
bool AsNeeded = !TC.getTriple().isOSAIX();
1333-
CmdArgs.push_back("-lFortranFloat128Math");
1333+
CmdArgs.push_back("-lflang_rt.quadmath");
13341334
if (AsNeeded)
13351335
addAsNeededOption(TC, Args, CmdArgs, /*as_needed=*/true);
13361336
CmdArgs.push_back(Args.MakeArgString("-l" + F128LibName));

flang-rt/cmake/modules/AddFlangRT.cmake

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

9-
# Builds a library with common options for flang-rt.
9+
# Builds a library with common options for Flang-RT.
1010
#
1111
# Usage:
1212
#
@@ -108,11 +108,11 @@ function (add_flangrt_library name)
108108
endif ()
109109

110110
# Flang-RT's public headers
111-
target_include_directories(${name} PRIVATE "${FLANG_RT_SOURCE_DIR}/include")
111+
target_include_directories(${name} PUBLIC "${FLANG_RT_SOURCE_DIR}/include")
112112

113113
# For ISO_Fortran_binding.h to be found by the runtime itself (Accessed as #include "flang/ISO_Fortran_binding.h")
114114
# User applications can use #include <ISO_Fortran_binding.h>
115-
target_include_directories(${name} PRIVATE "${FLANG_SOURCE_DIR}/include")
115+
target_include_directories(${name} PUBLIC "${FLANG_SOURCE_DIR}/include")
116116

117117
# For Flang-RT's configured config.h to be found
118118
target_include_directories(${name} PRIVATE "${FLANG_RT_BINARY_DIR}")

flang-rt/cmake/modules/AddFlangRTOffload.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ macro(enable_cuda_compilation name files)
3434
)
3535
endif()
3636
set_source_files_properties(${files} PROPERTIES COMPILE_OPTIONS
37-
"${CUDA_COMPILE_OPTIONS}"
38-
)
37+
"${CUDA_COMPILE_OPTIONS}")
3938

4039
# Create a .a library consisting of CUDA PTX.
4140
# This is different from a regular static library. The CUDA_PTX_COMPILATION

flang-rt/examples/ExternalHelloWorld/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ add_llvm_example(external-hello-world
1313

1414
target_link_libraries(external-hello-world
1515
PRIVATE
16-
flang_rt.runtime
16+
flang_rt.runtime
1717
)

flang-rt/include/flang-rt/runtime/tools.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ inline RT_API_ATTRS RESULT ApplyFloatingPointKind(
348348
if constexpr (HasCppTypeFor<TypeCategory::Real, 16>) {
349349
// If FUNC implemenation relies on FP math functions,
350350
// then we should not be here. The compiler should have
351-
// generated a call to an entry in FortranFloat128Math
351+
// generated a call to an entry in the libflang_rt.quadmath
352352
// library.
353353
if constexpr (!NEEDSMATH) {
354354
return FUNC<16>{}(std::forward<A>(x)...);

flang-rt/lib/quadmath/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# It is distributed as a static library only.
1313
# Fortran programs/libraries that end up linking any of the provided
1414
# will have a dependency on the third-party library that is being
15-
# used for building this FortranFloat128Math library.
15+
# used for building this libflang_rt.quadmath library.
1616

1717
include(CheckLibraryExists)
1818
include(CheckIncludeFile)
@@ -95,7 +95,7 @@ if (FLANG_RUNTIME_F128_MATH_LIB)
9595
endif()
9696

9797
if (WIN32)
98-
# Do not create a FortranFloat128Math library under Windows, the Flang
98+
# Do not create a flang_rt.quadmath library under Windows, the Flang
9999
# driver never links it. Instead, add the sources to flang_rt.runtime.
100100
target_sources(FortranFloat128MathILib INTERFACE ${sources})
101101
target_compile_definitions(FortranFloat128MathILib INTERFACE HAS_QUADMATHLIB)

flang-rt/lib/quadmath/complex-math.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*===-- lib/FortranFloat128Math/complex-math.c ----------------------*- C -*-===
1+
/*===-- lib/quadmath/complex-math.c ---------------------------------*- C -*-===
22
*
33
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
* See https://llvm.org/LICENSE.txt for license information.

flang-rt/lib/quadmath/complex-math.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@
5959
#error "Float128Math build with glibc>=2.26 is unsupported yet"
6060
#endif
6161

62-
#endif // FLANG_RT_QUADMATH_COMPLEX_MATH_H_
62+
#endif /* FLANG_RT_QUADMATH_COMPLEX_MATH_H_ */

flang-rt/lib/runtime/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ file(GLOB_RECURSE private_headers
9999
)
100100

101101

102-
# Import changes from sibling FortranFloat128Math
102+
# Import changes from flang_rt.quadmath
103103
get_target_property(f128_sources
104104
FortranFloat128MathILib INTERFACE_SOURCES
105105
)
@@ -170,7 +170,7 @@ else()
170170

171171
enable_cuda_compilation(${name} "${supported_sources}")
172172
enable_omp_offload_compilation(${name} "${supported_sources}")
173-
add_dependencies(flang_rt ${name})
173+
add_dependencies(flang_rt.runtime ${name})
174174
endfunction ()
175175

176176
# Variants of the static flang_rt for different versions of the msvc runtime.

flang-rt/test/Runtime/no-cpp-dep.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/*
22
This test makes sure that flang's runtime does not depend on the C++ runtime
3-
library. It tries to link this simple file against libflang_rt.a with
3+
library. It tries to link this simple file against libflang_rt.runtime.a with
44
a C compiler.
55
66
UNSUPPORTED: system-windows
77
UNSUPPORTED: offload-cuda
88
99
RUN: %if system-aix %{ export OBJECT_MODE=64 %}
10-
RUN: %cc -std=c99 %s -I%include -L"%libdir" -lflang_rt -lm \
10+
RUN: %cc -std=c99 %s -I%include -L"%libdir" -lflang_rt.runtime -lm \
1111
RUN: %if system-aix %{-lpthread %}
1212
RUN: rm a.out
1313
*/

0 commit comments

Comments
 (0)