[flang-commits] [PATCH] D94945: ClangBuilder: Enable fortran in test-suite
Diana Picus via Phabricator via flang-commits
flang-commits at lists.llvm.org
Mon Jan 18 21:42:57 PST 2021
rovka created this revision.
rovka added a reviewer: gkistanova.
Herald added a subscriber: kristof.beyls.
Herald added a reviewer: sscalpone.
rovka requested review of this revision.
Automatically enable running the fortran parts of the test-suite if
flang is part of the checkout. In order to do this, we need to pass two
CMake defines when configuring the test-suite: one telling it to enable
fortran and one pointing it at flang. The latter picks the most recently
built flang (i.e. it chooses the one from stage 2 if there is one).
At the moment, this only affects clang-cmake-aarch64-full.
https://reviews.llvm.org/D94945
Files:
zorg/buildbot/builders/ClangBuilder.py
Index: zorg/buildbot/builders/ClangBuilder.py
===================================================================
--- zorg/buildbot/builders/ClangBuilder.py
+++ zorg/buildbot/builders/ClangBuilder.py
@@ -1,6 +1,7 @@
import copy
from datetime import datetime
+from buildbot.plugins import util
from buildbot.process.properties import WithProperties, Property
from buildbot.steps.shell import ShellCommand, SetProperty
from buildbot.steps.shell import WarningCountingShellCommand
@@ -382,9 +383,11 @@
if not vs:
cc = 'clang'
cxx = 'clang++'
+ fc = 'flang'
else:
cc = 'clang-cl.exe'
cxx = 'clang-cl.exe'
+ fc = 'flang.exe'
############# STAGE 2
@@ -496,6 +499,14 @@
'--cc', cc,
'--cxx', cxx,
'--use-lit', lit]
+ # Enable fortran if flang is checked out
+ if checkout_flang:
+ fortran_flags = [
+ '--cmake-define=TEST_SUITE_FORTRAN:STRING=ON',
+ util.Interpolate(
+ '--cmake-define=CMAKE_Fortran_COMPILER=' +
+ '%(prop:builddir)s/'+compiler_path+'/bin/'+fc)]
+ test_suite_cmd.extend(fortran_flags)
# Append any option provided by the user
test_suite_cmd.extend(testsuite_flags)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94945.317462.patch
Type: text/x-patch
Size: 1423 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210119/edab6530/attachment.bin>
More information about the flang-commits
mailing list