Skip to content

Commit b02f47d

Browse files
committed
Not supporting device linking in regression tests
1 parent 1d91e82 commit b02f47d

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

flang-rt/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ set(FLANG_RT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
2323
set(FLANG_RT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
2424
set(FLANG_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../flang")
2525

26-
2726
# CMake 3.24 is the first version of CMake that directly recognizes Flang.
2827
# LLVM's requirement is only CMake 3.20, teach CMake 3.20-3.23 how to use Flang.
2928
if (CMAKE_VERSION VERSION_LESS "3.24")

flang-rt/test/Driver/ctofortran.f90

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
! UNSUPPORTED: system-windows
2+
! UNSUPPORTED: offload-cuda
23

34
! RUN: split-file %s %t
45
! RUN: %clang -I"%include/flang" -c %t/cfile.c -o %t/cfile.o
5-
! RUN: %flang -L"%libdir" %deplibs %t/ffile.f90 %t/cfile.o -o %t/ctofortran
6+
! RUN: %flang -L"%libdir" %t/ffile.f90 %t/cfile.o -o %t/ctofortran
67
! RUN: env LD_LIBRARY_PATH="$LD_LIBRARY_PATH:%libdir" %t/ctofortran | FileCheck %s
78

89
!--- ffile.f90

flang-rt/test/Driver/exec.f90

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
! REQUIRES: flang-rt
2+
! UNSUPPORTED: offload-cuda
3+
24
! Verify that flang can correctly build executables.
35

4-
! RUN: %flang -L"%libdir" %s %deplibs -o %t
6+
! RUN: %flang -L"%libdir" %s -o %t
57
! RUN: env LD_LIBRARY_PATH="$LD_LIBRARY_PATH:%libdir" %t | FileCheck %s
68

79
! CHECK: Hello, World!

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ library. It tries to link this simple file against libflang_rt.a with
44
a C compiler.
55
66
UNSUPPORTED: system-windows
7+
UNSUPPORTED: offload-cuda
78
89
RUN: %if system-aix %{ export OBJECT_MODE=64 %}
9-
RUN: %cc -std=c99 %s -I%include -L"%libdir" -lflang_rt -lm %deplibs \
10+
RUN: %cc -std=c99 %s -I%include -L"%libdir" -lflang_rt -lm \
1011
RUN: %if system-aix %{-lpthread %}
1112
RUN: rm a.out
1213
*/

flang-rt/test/lit.cfg.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ def shjoin(args, sep=" "):
9797
# Library path of libflang_rt.a (for lib search path when using non-Flang driver for linking)
9898
config.substitutions.append(("%libdir", config.flang_rt_output_resource_lib_dir))
9999

100-
# Additional library depedendencies the that Flang driver does not add itself.
101-
deplibs = []
100+
# For CUDA offloading, additional steps (device linking) and libraries (cudart) are needed.
102101
if config.flang_rt_experimental_offload_support == "CUDA":
103-
deplibs.append("-lcudart")
104-
config.substitutions.append(("%deplibs", shjoin(deplibs)))
102+
config.available_features.add("offload-cuda")

flang/test/lit.cfg.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@
163163
ToolSubst("%not_todo_abort_cmd", command=FindTool("not"), unresolved="fatal")
164164
)
165165

166+
if config.flang_include_runtime:
166167
config.available_features.add("flang-rt")
168+
167169
# Add all the tools and their substitutions (if applicable). Use the search paths provided for
168170
# finding the tools.
169171
if config.flang_standalone_build:

0 commit comments

Comments
 (0)