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}")
2323set (FLANG_RT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR} " )
2424set (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.
2928if (CMAKE_VERSION VERSION_LESS "3.24" )
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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!
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
44a C compiler.
55
66UNSUPPORTED: system-windows
7+ UNSUPPORTED: offload-cuda
78
89RUN: %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 \
1011RUN: %if system-aix %{-lpthread %}
1112RUN: rm a.out
1213*/
Original file line number Diff line number Diff 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)
9898config .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.
102101if 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 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.
169171if config .flang_standalone_build :
You can’t perform that action at this time.
0 commit comments