File tree Expand file tree Collapse file tree 6 files changed +11
-8
lines changed Expand file tree Collapse file tree 6 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ set(FLANG_RT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
23
23
set (FLANG_RT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR} " )
24
24
set (FLANG_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR} /../flang" )
25
25
26
-
27
26
# CMake 3.24 is the first version of CMake that directly recognizes Flang.
28
27
# LLVM's requirement is only CMake 3.20, teach CMake 3.20-3.23 how to use Flang.
29
28
if (CMAKE_VERSION VERSION_LESS "3.24" )
Original file line number Diff line number Diff line change 1
1
! UNSUPPORTED: system-windows
2
+ ! UNSUPPORTED: offload-cuda
2
3
3
4
! RUN: split-file %s %t
4
5
! 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
6
7
! RUN: env LD_LIBRARY_PATH="$LD_LIBRARY_PATH:%libdir" %t/ctofortran | FileCheck %s
7
8
8
9
!- -- ffile.f90
Original file line number Diff line number Diff line change 1
1
! REQUIRES: flang-rt
2
+ ! UNSUPPORTED: offload-cuda
3
+
2
4
! Verify that flang can correctly build executables.
3
5
4
- ! RUN: %flang -L"%libdir" %s %deplibs -o %t
6
+ ! RUN: %flang -L"%libdir" %s -o %t
5
7
! RUN: env LD_LIBRARY_PATH="$LD_LIBRARY_PATH:%libdir" %t | FileCheck %s
6
8
7
9
! CHECK: Hello, World!
Original file line number Diff line number Diff line change @@ -4,9 +4,10 @@ library. It tries to link this simple file against libflang_rt.a with
4
4
a C compiler.
5
5
6
6
UNSUPPORTED: system-windows
7
+ UNSUPPORTED: offload-cuda
7
8
8
9
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 \
10
11
RUN: %if system-aix %{-lpthread %}
11
12
RUN: rm a.out
12
13
*/
Original file line number Diff line number Diff line change @@ -97,8 +97,6 @@ def shjoin(args, sep=" "):
97
97
# Library path of libflang_rt.a (for lib search path when using non-Flang driver for linking)
98
98
config .substitutions .append (("%libdir" , config .flang_rt_output_resource_lib_dir ))
99
99
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.
102
101
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" )
Original file line number Diff line number Diff line change 163
163
ToolSubst ("%not_todo_abort_cmd" , command = FindTool ("not" ), unresolved = "fatal" )
164
164
)
165
165
166
+ if config .flang_include_runtime :
166
167
config .available_features .add ("flang-rt" )
168
+
167
169
# Add all the tools and their substitutions (if applicable). Use the search paths provided for
168
170
# finding the tools.
169
171
if config .flang_standalone_build :
You can’t perform that action at this time.
0 commit comments