2021-10-01 14:58:52 +08:00
|
|
|
#===-- runtime/CMakeLists.txt ----------------------------------------------===#
|
|
|
|
#
|
|
|
|
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
# See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
#
|
|
|
|
#===------------------------------------------------------------------------===#
|
2018-05-17 01:22:33 +08:00
|
|
|
|
2020-03-13 04:28:35 +08:00
|
|
|
include(CheckCXXSymbolExists)
|
|
|
|
include(CheckCXXSourceCompiles)
|
|
|
|
check_cxx_symbol_exists(strerror string.h HAVE_STRERROR)
|
|
|
|
check_cxx_symbol_exists(strerror_r string.h HAVE_STRERROR_R)
|
|
|
|
# Can't use symbol exists here as the function is overloaded in C++
|
|
|
|
check_cxx_source_compiles(
|
|
|
|
"#include <string.h>
|
|
|
|
int main() {
|
|
|
|
char buf[4096];
|
|
|
|
return strerror_s(buf, 4096, 0);
|
|
|
|
}
|
|
|
|
"
|
|
|
|
HAVE_DECL_STRERROR_S)
|
|
|
|
|
|
|
|
if (NOT (HAVE_STRERROR OR HAVE_STRERROR_R OR HAVE_DECL_STRERROR_S))
|
|
|
|
message(FATAL_ERROR "None of strerror, strerror_r, strerror_s found.")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
configure_file(config.h.cmake config.h)
|
2020-06-09 03:13:58 +08:00
|
|
|
# include_directories is used here instead of target_include_directories
|
|
|
|
# because add_flang_library creates multiple objects (STATIC/SHARED, OBJECT)
|
|
|
|
# with different names
|
|
|
|
include_directories(AFTER ${CMAKE_CURRENT_BINARY_DIR})
|
2020-03-13 04:28:35 +08:00
|
|
|
|
2021-10-01 14:58:52 +08:00
|
|
|
add_flang_library(FortranRuntime
|
2020-01-28 10:18:45 +08:00
|
|
|
ISO_Fortran_binding.cpp
|
2020-03-31 07:37:30 +08:00
|
|
|
allocatable.cpp
|
2021-07-30 03:02:45 +08:00
|
|
|
assign.cpp
|
2020-01-24 08:59:27 +08:00
|
|
|
buffer.cpp
|
2021-08-25 15:51:48 +08:00
|
|
|
command.cpp
|
[flang] Implement reductions in the runtime
Add runtime APIs, implementations, and tests for ALL, ANY, COUNT,
MAXLOC, MAXVAL, MINLOC, MINVAL, PRODUCT, and SUM reduction
transformantional intrinsic functions for all relevant argument
and result types and kinds, both without DIM= arguments
(total reductions) and with (partial reductions).
Complex-valued reductions have their APIs in C so that
C's _Complex types can be used for their results.
Some infrastructure work was also necessary or noticed:
* Usage of "long double" in the compiler was cleaned up a
bit, and host dependences on x86 / MSVC have been isolated
in a new Common/long-double header.
* Character comparison has been exposed via an extern template
so that reductions could use it.
* Mappings from Fortran type category/kind to host C++ types
and vice versa have been isolated into runtime/cpp-type.h and
then used throughout the runtime as appropriate.
* The portable 128-bit integer package in Common/uint128.h
was generalized to support signed comparisons.
* Bugs in descriptor indexing code were fixed.
Differential Revision: https://reviews.llvm.org/D99666
2021-04-01 00:14:08 +08:00
|
|
|
complex-reduction.c
|
2021-05-21 01:37:03 +08:00
|
|
|
copy.cpp
|
2020-03-31 07:37:30 +08:00
|
|
|
character.cpp
|
2020-02-05 08:55:45 +08:00
|
|
|
connection.cpp
|
2020-12-08 06:46:24 +08:00
|
|
|
derived.cpp
|
2021-07-20 02:53:20 +08:00
|
|
|
derived-api.cpp
|
2020-01-28 10:18:45 +08:00
|
|
|
descriptor.cpp
|
2021-06-26 01:40:08 +08:00
|
|
|
descriptor-io.cpp
|
2021-05-13 03:07:51 +08:00
|
|
|
dot-product.cpp
|
2020-02-14 06:41:56 +08:00
|
|
|
edit-input.cpp
|
|
|
|
edit-output.cpp
|
2020-01-24 08:59:27 +08:00
|
|
|
environment.cpp
|
2021-12-08 06:38:17 +08:00
|
|
|
extensions.cpp
|
2021-04-23 05:23:45 +08:00
|
|
|
extrema.cpp
|
2020-01-28 10:18:45 +08:00
|
|
|
file.cpp
|
2021-04-23 05:23:45 +08:00
|
|
|
findloc.cpp
|
2020-01-28 10:18:45 +08:00
|
|
|
format.cpp
|
2022-02-10 03:17:18 +08:00
|
|
|
inquiry.cpp
|
2020-02-05 08:55:45 +08:00
|
|
|
internal-unit.cpp
|
2020-02-14 06:41:56 +08:00
|
|
|
iostat.cpp
|
2020-01-28 10:18:45 +08:00
|
|
|
io-api.cpp
|
|
|
|
io-error.cpp
|
|
|
|
io-stmt.cpp
|
|
|
|
main.cpp
|
2021-05-18 05:06:44 +08:00
|
|
|
matmul.cpp
|
2020-01-28 10:18:45 +08:00
|
|
|
memory.cpp
|
2021-04-03 00:30:31 +08:00
|
|
|
misc-intrinsic.cpp
|
2021-05-06 02:37:49 +08:00
|
|
|
namelist.cpp
|
[flang] Implement numeric intrinsic functions in runtime
Adds APIs, implementations, and unit tests for AINT, ANINT,
CEILING, EXPONENT, FLOOR, FRACTION, MOD, MODULO, NEAREST, NINT,
RRSPACING, SCALE, SET_EXPONENT, & SPACING.
Differential Revision: https://reviews.llvm.org/D99764
2021-04-02 03:59:59 +08:00
|
|
|
numeric.cpp
|
2021-12-08 04:19:34 +08:00
|
|
|
ragged.cpp
|
2021-04-08 04:14:14 +08:00
|
|
|
random.cpp
|
[flang] Implement reductions in the runtime
Add runtime APIs, implementations, and tests for ALL, ANY, COUNT,
MAXLOC, MAXVAL, MINLOC, MINVAL, PRODUCT, and SUM reduction
transformantional intrinsic functions for all relevant argument
and result types and kinds, both without DIM= arguments
(total reductions) and with (partial reductions).
Complex-valued reductions have their APIs in C so that
C's _Complex types can be used for their results.
Some infrastructure work was also necessary or noticed:
* Usage of "long double" in the compiler was cleaned up a
bit, and host dependences on x86 / MSVC have been isolated
in a new Common/long-double header.
* Character comparison has been exposed via an extern template
so that reductions could use it.
* Mappings from Fortran type category/kind to host C++ types
and vice versa have been isolated into runtime/cpp-type.h and
then used throughout the runtime as appropriate.
* The portable 128-bit integer package in Common/uint128.h
was generalized to support signed comparisons.
* Bugs in descriptor indexing code were fixed.
Differential Revision: https://reviews.llvm.org/D99666
2021-04-01 00:14:08 +08:00
|
|
|
reduction.cpp
|
2021-07-17 01:42:17 +08:00
|
|
|
pointer.cpp
|
2021-04-23 05:23:45 +08:00
|
|
|
product.cpp
|
2020-11-11 07:13:02 +08:00
|
|
|
stat.cpp
|
2020-01-28 10:18:45 +08:00
|
|
|
stop.cpp
|
2021-04-23 05:23:45 +08:00
|
|
|
sum.cpp
|
2021-11-27 03:39:31 +08:00
|
|
|
support.cpp
|
2020-01-28 10:18:45 +08:00
|
|
|
terminator.cpp
|
2021-06-09 16:19:43 +08:00
|
|
|
time-intrinsic.cpp
|
2020-01-28 10:18:45 +08:00
|
|
|
tools.cpp
|
|
|
|
transformational.cpp
|
|
|
|
type-code.cpp
|
2021-06-18 04:13:19 +08:00
|
|
|
type-info.cpp
|
2020-01-24 08:59:27 +08:00
|
|
|
unit.cpp
|
2020-02-14 06:41:56 +08:00
|
|
|
unit-map.cpp
|
2022-03-17 03:32:03 +08:00
|
|
|
utf.cpp
|
2020-03-13 04:28:35 +08:00
|
|
|
|
2020-04-16 20:34:17 +08:00
|
|
|
LINK_LIBS
|
2020-01-17 05:51:25 +08:00
|
|
|
FortranDecimal
|
2018-08-03 02:45:11 +08:00
|
|
|
)
|