[flang-commits] [flang] [flang][docs] Update llvm-test-suite docs (PR #81596)

David Spickett via flang-commits flang-commits at lists.llvm.org
Tue Feb 13 05:40:28 PST 2024


https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/81596

>From 72db0680da5b1c7c8e95523e8d3b248a444fd27f Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at linaro.org>
Date: Tue, 13 Feb 2024 11:32:59 +0000
Subject: [PATCH 1/2] [flang][docs] Update llvm-test-suite docs

With some missing config options and the need to install,
which I always forget.
---
 flang/docs/FortranLLVMTestSuite.md | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/flang/docs/FortranLLVMTestSuite.md b/flang/docs/FortranLLVMTestSuite.md
index 45485ef40106f6..1075b39f614a13 100644
--- a/flang/docs/FortranLLVMTestSuite.md
+++ b/flang/docs/FortranLLVMTestSuite.md
@@ -21,7 +21,9 @@ cmake -G "Ninja" -DCMAKE_C_COMPILER=<path to C compiler> \
     -DCMAKE_Fortran_COMPILER=<path to Fortran compiler> \
     -DTEST_SUITE_COLLECT_CODE_SIZE:STRING=OFF \
     -DTEST_SUITE_SUBDIRS:STRING="Fortran" \
-    -DTEST_SUITE_FORTRAN:STRING=ON ..
+    -DTEST_SUITE_FORTRAN:STRING=ON \
+    -DTEST_SUITE_LIT=<path to llvm-lit> \
+    <path to llvm-test-suite>
 ```
 
 This will configure the test-suite to run only the Fortran tests which
@@ -33,6 +35,19 @@ If your Fortran compiler is Flang, you may want to set the `NO_STOP_MESSAGE`
 environment variable to `1` in order to avoid test failures due to warnings
 about INEXACT signaling exceptions.
 
+In addition, flang must be installed to some location (`ninja install`). Otherwise
+you will get this error when configuring:
+```
+CMake Error at Fortran/gfortran/CMakeLists.txt:649 (find_file):
+  Could not find ISO_FORTRAN_C_HEADER using the following files:
+  ISO_Fortran_binding.h
+```
+
+Then to build and run the tests:
+```
+ninja
+ninja check
+```
 
 ## Running the SPEC CPU 2017
 

>From d8b7eff92f54142f9b15eef63ec846b3be67b121 Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at linaro.org>
Date: Tue, 13 Feb 2024 13:38:56 +0000
Subject: [PATCH 2/2] link to test suite's docs for flang specific steps

---
 flang/docs/FortranLLVMTestSuite.md | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/flang/docs/FortranLLVMTestSuite.md b/flang/docs/FortranLLVMTestSuite.md
index 1075b39f614a13..611e03cbad0eb2 100644
--- a/flang/docs/FortranLLVMTestSuite.md
+++ b/flang/docs/FortranLLVMTestSuite.md
@@ -31,17 +31,9 @@ are found in the Fortran subdirectory. To run the C/C++ tests
 alongside the Fortran tests omit the `-DTEST_SUITE_SUBDIRS` CMake
 variable.
 
-If your Fortran compiler is Flang, you may want to set the `NO_STOP_MESSAGE`
-environment variable to `1` in order to avoid test failures due to warnings
-about INEXACT signaling exceptions.
-
-In addition, flang must be installed to some location (`ninja install`). Otherwise
-you will get this error when configuring:
-```
-CMake Error at Fortran/gfortran/CMakeLists.txt:649 (find_file):
-  Could not find ISO_FORTRAN_C_HEADER using the following files:
-  ISO_Fortran_binding.h
-```
+If your Fortran compiler is Flang, there are a couple of other things you need
+to do, which are explained
+[here](https://github.com/llvm/llvm-test-suite/blob/main/Fortran/gfortran/README.md#usage).
 
 Then to build and run the tests:
 ```



More information about the flang-commits mailing list