[PATCH] D130628: [zorg] Run test-suite with flang-new

Diana Picus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 27 05:22:44 PDT 2022


rovka created this revision.
rovka added reviewers: gkistanova, DavidSpickett, awarzynski.
rovka added projects: Flang, Zorg.
Herald added subscribers: jdoerfert, kristof.beyls.
Herald added a reviewer: sscalpone.
Herald added a project: All.
rovka requested review of this revision.

At the moment, `clang-aarch64-full-2stage` is running the
`llvm-test-suite` with `flang-to-external-fc`, which is a wrapper script
involving both flang and gfortran.

This patch switches to using the `flang-new` driver, therefore removing
our dependence on gfortran.

However, support for generating executables with `flang-new` is still
experimental and needs a few flags to help it along.

Furthermore, we need a couple of environment variables when running the
test-suite. These are currently hardcoded. I expect one of them
(NO_STOP_MESSAGE) to be needed for a long time, so it's fine to
leave it like that. The other one is LIT_FILTER_OUT, which skips some tests that
are currently failing for various reasons.  The plan is to fix those in
the very near future, so it would be nice if we could source this from
the worker instead (I don't know how to do that).


Repository:
  rZORG LLVM Github Zorg

https://reviews.llvm.org/D130628

Files:
  buildbot/osuosl/master/config/builders.py
  zorg/buildbot/builders/ClangBuilder.py


Index: zorg/buildbot/builders/ClangBuilder.py
===================================================================
--- zorg/buildbot/builders/ClangBuilder.py
+++ zorg/buildbot/builders/ClangBuilder.py
@@ -386,11 +386,11 @@
     if not vs:
         cc = 'clang'
         cxx = 'clang++'
-        fc = 'flang-to-external-fc'
+        fc = 'flang-new'
     else:
         cc = 'clang-cl.exe'
         cxx = 'clang-cl.exe'
-        fc = 'flang.exe'
+        fc = 'flang-new.exe'
 
 
     ############# STAGE 2
@@ -506,6 +506,10 @@
             if checkout_flang:
                 fortran_flags = [
                         '--cmake-define=TEST_SUITE_FORTRAN:STRING=ON',
+                        util.Interpolate(
+                            '--cmake-define=CMAKE_Fortran_FLAGS:STRING=' +
+                            '-flang-experimental-exec -lpgmath ' +
+                            '-Xlinker -rpath %(prop:builddir)s/'+compiler_path+'/lib'),
                         util.Interpolate(
                             '--cmake-define=CMAKE_Fortran_COMPILER=' +
                             '%(prop:builddir)s/'+compiler_path+'/bin/'+fc)]
Index: buildbot/osuosl/master/config/builders.py
===================================================================
--- buildbot/osuosl/master/config/builders.py
+++ buildbot/osuosl/master/config/builders.py
@@ -464,6 +464,10 @@
                     useTwoStage=True,
                     testStage1=False,
                     runTestSuite=True,
+                    env={
+                        'NO_STOP_MESSAGE':'1', # For Fortran test-suite
+                        'LIT_FILTER_OUT':'"FM(813|815|817|820|828|831|833|905|907)"',
+                    },
                     testsuite_flags=[
                         '--cppflags', '-mcpu=cortex-a57',
                         '--threads=32', '--build-threads=32'],


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130628.448005.patch
Type: text/x-patch
Size: 1854 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220727/24f7c3a6/attachment.bin>


More information about the llvm-commits mailing list