https://github.com/Iasonaskrpr updated 
https://github.com/llvm/llvm-project/pull/208298

>From e85b5a21177da0e8784c6d4461680f79d50c8bfc Mon Sep 17 00:00:00 2001
From: Iasonaskrpr <[email protected]>
Date: Mon, 6 Jul 2026 19:41:37 +0300
Subject: [PATCH 1/7] [lldb] Allow for Fortran API tests to use F_SOURCES in
 Makefile

---
 .../Python/lldbsuite/test/builders/builder.py | 10 ++++--
 lldb/packages/Python/lldbsuite/test/dotest.py | 17 ++++++++++
 .../Python/lldbsuite/test/dotest_args.py      |  9 +++++
 .../Python/lldbsuite/test/make/Makefile.rules | 33 ++++++++++++++++++-
 lldb/test/API/CMakeLists.txt                  | 14 ++++++++
 lldb/test/API/lit.cfg.py                      |  3 ++
 lldb/test/API/lit.site.cfg.py.in              |  2 ++
 7 files changed, 85 insertions(+), 3 deletions(-)

diff --git a/lldb/packages/Python/lldbsuite/test/builders/builder.py 
b/lldb/packages/Python/lldbsuite/test/builders/builder.py
index 93ce4cc732bd3..3aa4a7ea2c96a 100644
--- a/lldb/packages/Python/lldbsuite/test/builders/builder.py
+++ b/lldb/packages/Python/lldbsuite/test/builders/builder.py
@@ -203,12 +203,18 @@ def getToolchainUtil(util_name):
         if lldbplatformutil.platformIsDarwin():
             utils.extend(["AR=%slibtool" % os.getenv("CROSS_COMPILE", "")])
 
-        return [
+        build_cmd = [
             "CC=%s" % cc,
             "CC_TYPE=%s" % cc_type,
             "CXX=%s" % cxx,
-        ] + utils
+        ]
+
+        fc = configuration.fortran_compiler
+        if fc:
+            build_cmd.append("FC=%s" % fc)  
 
+        return build_cmd + utils
+    
     def getSDKRootSpec(self):
         """
         Helper function to return the key-value string to specify the SDK root
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py 
b/lldb/packages/Python/lldbsuite/test/dotest.py
index b1145f8f96078..c3bf11efccf03 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -267,6 +267,23 @@ def parseOptionsAndInitTestdirs():
                     configuration.compiler = candidate
                     break
 
+    if args.fortran_compiler:
+        configuration.fortran_compiler = os.path.abspath(args.fortran_compiler)
+        if not is_exe(configuration.fortran_compiler):
+            configuration.fortran_compiler = which(args.fortran_compiler)
+        if not is_exe(configuration.fortran_compiler):
+            logging.error(
+                '"%s" is not a valid Fortran compiler executable; 
aborting...', args.fortran_compiler
+            )
+            sys.exit(-1)
+    else:
+        # If no Fortran compiler was explicitly specified, search for local 
fallbacks.
+        candidateFortranCompilers = ["flang-new", "flang", "gfortran"]
+        for candidate in candidateFortranCompilers:
+            if which(candidate):
+                configuration.fortran_compiler = candidate
+                break
+
     if args.make:
         configuration.make_path = args.make
 
diff --git a/lldb/packages/Python/lldbsuite/test/dotest_args.py 
b/lldb/packages/Python/lldbsuite/test/dotest_args.py
index 13b3d85628dc2..c06ebd60ebcf0 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest_args.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest_args.py
@@ -48,6 +48,15 @@ def create_parser():
             """Specify the compiler(s) used to build the inferior executables. 
The compiler path can be an executable basename or a full path to a compiler 
executable. This option can be specified multiple times."""
         ),
     )
+    group.add_argument(
+        '--fortran-compiler',
+        metavar="fortran_compiler",
+        dest='fortran_compiler',
+        default="",
+        help=textwrap.dedent(
+            """The fortran compiler used to build the test programs."""
+        ),
+    )     
     group.add_argument(
         "--sysroot",
         metavar="sysroot",
diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules 
b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
index 51729959fdf62..86e92f6ac6427 100644
--- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -255,14 +255,17 @@ endif
 DEBUG_INFO_FLAG ?= -g
 
 CFLAGS ?= $(DEBUG_INFO_FLAG) -O0
+FFLAGS ?= $(DEBUG_INFO_FLAG) -O0
 
 # Some tests require no debug information. When lldb-dotest specifies a DWARF 
version,
 # it adds `-gdwarf-{version}` to the CFLAGS environment variable which causes 
those tests
 # to fail. Strip any existing debug flags from CFLAGS and force -g0 to prevent 
this.
 ifeq "$(MAKE_NO_DEBUG_INFO)" "YES"
     CFLAGS := $(filter-out -g%,$(CFLAGS)) -g0
+               FFLAGS := $(filter-out -g%,$(FFLAGS)) -g0
 endif
 CFLAGS += $(SYSROOT_FLAGS)
+FFLAGS += $(SYSROOT_FLAGS)
 
 ifeq "$(OS)" "Darwin"
        CFLAGS += $(FRAMEWORK_INCLUDES)
@@ -270,18 +273,22 @@ endif
 
 CFLAGS += -I$(LLDB_BASE_DIR)/include -I$(LLDB_OBJ_ROOT)/include
 CFLAGS += -I$(SRCDIR) -I$(THIS_FILE_DIR)
+FFLAGS += -I$(LLDB_BASE_DIR)/include -I$(LLDB_OBJ_ROOT)/include
+FFLAGS += -I$(SRCDIR) -I$(THIS_FILE_DIR)
 
 ifndef NO_TEST_COMMON_H
   CFLAGS += -include $(THIS_FILE_DIR)/test_common.h
 endif
 
 CFLAGS += $(NO_LIMIT_DEBUG_INFO_FLAGS) $(ARCH_CFLAGS)
+FFLAGS += $(ARCH_CFLAGS)
 
 # Use this one if you want to build one part of the result without debug 
information:
 CFLAGS_NO_DEBUG = -O0 $(FRAMEWORK_INCLUDES) $(ARCH_CFLAGS) $(CFLAGS_EXTRAS) 
$(SYSROOT_FLAGS)
 
 ifeq "$(MAKE_DWO)" "YES"
        CFLAGS += -gsplit-dwarf
+       FFLAGS += -gsplit-dwarf
 endif
 
 ifeq "$(MAKE_DEBUG_NAMES)" "YES"
@@ -324,10 +331,17 @@ ifeq ($(CC_TYPE), clang)
 endif
 
 CFLAGS += $(CFLAGS_EXTRAS)
+FFLAGS += $(FFLAGS_EXTRAS)
 CXXFLAGS += -std=c++11 $(CFLAGS) $(ARCH_CXXFLAGS)
 # Copy common options to the linker flags (dwarf, arch. & etc).
 # Note: we get some 'garbage' options for linker here (such as -I, --isystem & 
etc).
-LDFLAGS += $(CFLAGS)
+ifneq "$(strip $(F_SOURCES))" ""
+    # We are building Fortran. Use FFLAGS flags.
+    LDFLAGS += $(FFLAGS)
+else
+    # We are building C/C++. Use CFLAGS.
+    LDFLAGS += $(CFLAGS)
+endif
 LDFLAGS += $(LD_EXTRAS) $(ARCH_LDFLAGS)
 ifeq (,$(filter $(OS), Windows_NT Android Darwin Wasm))
        ifneq (,$(filter YES,$(ENABLE_THREADS)))
@@ -540,6 +554,20 @@ ifeq ($(CC_TYPE), clang)
        CXXFLAGS += --driver-mode=g++
 endif
 
+#----------------------------------------------------------------------
+# Check if we have any Fortran source files
+#----------------------------------------------------------------------
+ifneq "$(strip $(F_SOURCES))" ""
+       ifeq "$(FC)" ""
+    $(error "No Fortran compiler found for fortran tests")
+  endif
+  OBJECTS +=$(strip $(F_SOURCES:.f90=.o))
+       # Override the linker with the Fortran compiler, LDC is not needed 
+       # currently so it is set to any
+       override LD := $(FC)
+       override LDC := any
+endif
+
 ifneq "$(CXX)" ""
        # Specify the driver mode parameter if we use clang as the linker.
        ifeq ($(LDC), clang)
@@ -673,6 +701,9 @@ endif
 %.o: %.mm %.d
        $(CXX) $(CXXFLAGS) -MT $@ -MD -MP -MF $*.d -c -o $@ $<
 
+%.o: %.f90
+       $(FC) $(FFLAGS) -c -o $@ $<
+
 #----------------------------------------------------------------------
 # Automatic variables based on items already entered. Below we create
 # an object's lists from the list of sources by replacing all entries
diff --git a/lldb/test/API/CMakeLists.txt b/lldb/test/API/CMakeLists.txt
index bff3bac438d6b..ad093dd6e3ccb 100644
--- a/lldb/test/API/CMakeLists.txt
+++ b/lldb/test/API/CMakeLists.txt
@@ -88,6 +88,20 @@ else()
   set(LLDB_DEFAULT_TEST_COMPILER "")
 endif()
 
+if(LLDB_ENABLE_FORTRAN)
+  # Prefer the in-tree built target if available.
+  if(TARGET flang)
+    set(LLDB_DEFAULT_TEST_FORTRAN_COMPILER 
"${LLVM_TOOLS_BINARY_DIR}/flang${CMAKE_EXECUTABLE_SUFFIX}")
+  # Fall back to the out-of-tree installation prefix if configured via 
find_package.
+  elif(FLANG_INSTALL_PREFIX)
+    set(LLDB_DEFAULT_TEST_FORTRAN_COMPILER 
"${FLANG_INSTALL_PREFIX}/bin/flang${CMAKE_EXECUTABLE_SUFFIX}")
+  else()
+    set(LLDB_DEFAULT_TEST_FORTRAN_COMPILER "")
+  endif()
+
+  set(LLDB_TEST_FORTRAN_COMPILER "${LLDB_DEFAULT_TEST_FORTRAN_COMPILER}" CACHE 
PATH "Fortran Compiler to use for building LLDB test inferiors")
+endif()
+
 set(LLDB_TEST_EXECUTABLE "${LLDB_DEFAULT_TEST_EXECUTABLE}" CACHE PATH "lldb 
executable used for testing")
 set(LLDB_TEST_COMPILER "${LLDB_DEFAULT_TEST_COMPILER}" CACHE PATH "C Compiler 
to use for building LLDB test inferiors")
 set(LLDB_TEST_DSYMUTIL "${LLDB_DEFAULT_TEST_DSYMUTIL}" CACHE PATH "dsymutil 
used for generating dSYM bundles")
diff --git a/lldb/test/API/lit.cfg.py b/lldb/test/API/lit.cfg.py
index 7d6b43f07287d..3d27aa6f7d3bc 100644
--- a/lldb/test/API/lit.cfg.py
+++ b/lldb/test/API/lit.cfg.py
@@ -297,6 +297,9 @@ def delete_module_cache(path):
 if is_configured("test_compiler"):
     dotest_cmd += ["--compiler", config.test_compiler]
 
+if is_configured("fortran_test_compiler"):
+    dotest_cmd += ["--fortran-compiler", config.fortran_test_compiler]
+
 if is_configured("dsymutil"):
     dotest_cmd += ["--dsymutil", config.dsymutil]
 
diff --git a/lldb/test/API/lit.site.cfg.py.in b/lldb/test/API/lit.site.cfg.py.in
index 44c62414f8bdd..c655f9b1dfd96 100644
--- a/lldb/test/API/lit.site.cfg.py.in
+++ b/lldb/test/API/lit.site.cfg.py.in
@@ -24,6 +24,7 @@ config.python_root_dir = "@Python3_ROOT_DIR@"
 config.lua_executable = "@LUA_EXECUTABLE@"
 config.lldb_lua_cpath = "@LLDB_LUA_CPATH@"
 config.lua_test_entry = "TestLuaAPI.py"
+config.lldb_enable_fortran = "@LLDB_ENABLE_FORTRAN@"
 config.dotest_common_args_str = 
lit_config.substitute("@LLDB_TEST_COMMON_ARGS@")
 config.dotest_user_args_str = lit_config.substitute("@LLDB_TEST_USER_ARGS@")
 config.lldb_platform_url = lit_config.substitute("@LLDB_TEST_PLATFORM_URL@")
@@ -36,6 +37,7 @@ config.enabled_plugins = []
 config.lldb_executable = lit_config.substitute('@LLDB_TEST_EXECUTABLE@')
 config.test_triple = '@LLDB_TEST_TRIPLE@'
 config.test_compiler = lit_config.substitute('@LLDB_TEST_COMPILER@')
+config.fortran_test_compiler = 
lit_config.substitute('@LLDB_TEST_FORTRAN_COMPILER@')
 config.dsymutil = lit_config.substitute('@LLDB_TEST_DSYMUTIL@')
 config.make = lit_config.substitute('@LLDB_TEST_MAKE@')
 config.has_libcxx = @LLDB_HAS_LIBCXX@

>From cc024a397ee7203bd60d21211f9c992d97593cfe Mon Sep 17 00:00:00 2001
From: Iasonaskrpr <[email protected]>
Date: Mon, 6 Jul 2026 20:20:47 +0300
Subject: [PATCH 2/7] [lldb] Removed broken elseif statement in CMake

---
 lldb/test/API/CMakeLists.txt | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/lldb/test/API/CMakeLists.txt b/lldb/test/API/CMakeLists.txt
index ad093dd6e3ccb..540a1280ad04a 100644
--- a/lldb/test/API/CMakeLists.txt
+++ b/lldb/test/API/CMakeLists.txt
@@ -92,9 +92,6 @@ if(LLDB_ENABLE_FORTRAN)
   # Prefer the in-tree built target if available.
   if(TARGET flang)
     set(LLDB_DEFAULT_TEST_FORTRAN_COMPILER 
"${LLVM_TOOLS_BINARY_DIR}/flang${CMAKE_EXECUTABLE_SUFFIX}")
-  # Fall back to the out-of-tree installation prefix if configured via 
find_package.
-  elif(FLANG_INSTALL_PREFIX)
-    set(LLDB_DEFAULT_TEST_FORTRAN_COMPILER 
"${FLANG_INSTALL_PREFIX}/bin/flang${CMAKE_EXECUTABLE_SUFFIX}")
   else()
     set(LLDB_DEFAULT_TEST_FORTRAN_COMPILER "")
   endif()

>From 9a7038bf6e8f3d990bd67fbe81923f2c62aa9e59 Mon Sep 17 00:00:00 2001
From: Iasonaskrpr <[email protected]>
Date: Wed, 8 Jul 2026 22:34:02 +0300
Subject: [PATCH 3/7] [lldb] Fixed formatting

---
 lldb/packages/Python/lldbsuite/test/builders/builder.py | 4 ++--
 lldb/packages/Python/lldbsuite/test/dotest.py           | 3 ++-
 lldb/packages/Python/lldbsuite/test/dotest_args.py      | 6 +++---
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/lldb/packages/Python/lldbsuite/test/builders/builder.py 
b/lldb/packages/Python/lldbsuite/test/builders/builder.py
index 3aa4a7ea2c96a..c53de950028e8 100644
--- a/lldb/packages/Python/lldbsuite/test/builders/builder.py
+++ b/lldb/packages/Python/lldbsuite/test/builders/builder.py
@@ -211,10 +211,10 @@ def getToolchainUtil(util_name):
 
         fc = configuration.fortran_compiler
         if fc:
-            build_cmd.append("FC=%s" % fc)  
+            build_cmd.append("FC=%s" % fc)
 
         return build_cmd + utils
-    
+
     def getSDKRootSpec(self):
         """
         Helper function to return the key-value string to specify the SDK root
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py 
b/lldb/packages/Python/lldbsuite/test/dotest.py
index c3bf11efccf03..9c415ec5889b3 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -273,7 +273,8 @@ def parseOptionsAndInitTestdirs():
             configuration.fortran_compiler = which(args.fortran_compiler)
         if not is_exe(configuration.fortran_compiler):
             logging.error(
-                '"%s" is not a valid Fortran compiler executable; 
aborting...', args.fortran_compiler
+                '"%s" is not a valid Fortran compiler executable; aborting...',
+                args.fortran_compiler,
             )
             sys.exit(-1)
     else:
diff --git a/lldb/packages/Python/lldbsuite/test/dotest_args.py 
b/lldb/packages/Python/lldbsuite/test/dotest_args.py
index c06ebd60ebcf0..49bd9fefc40c2 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest_args.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest_args.py
@@ -49,14 +49,14 @@ def create_parser():
         ),
     )
     group.add_argument(
-        '--fortran-compiler',
+        "--fortran-compiler",
         metavar="fortran_compiler",
-        dest='fortran_compiler',
+        dest="fortran_compiler",
         default="",
         help=textwrap.dedent(
             """The fortran compiler used to build the test programs."""
         ),
-    )     
+    )
     group.add_argument(
         "--sysroot",
         metavar="sysroot",

>From edc9a19ad4d7f1af2f4edd9619c7c01949a35e9c Mon Sep 17 00:00:00 2001
From: Iasonaskrpr <[email protected]>
Date: Wed, 8 Jul 2026 23:12:13 +0300
Subject: [PATCH 4/7] [lldb] Added fortran_compiler to configuration

---
 lldb/packages/Python/lldbsuite/test/configuration.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lldb/packages/Python/lldbsuite/test/configuration.py 
b/lldb/packages/Python/lldbsuite/test/configuration.py
index 7f9616be9a482..db2cec5e405b9 100644
--- a/lldb/packages/Python/lldbsuite/test/configuration.py
+++ b/lldb/packages/Python/lldbsuite/test/configuration.py
@@ -43,6 +43,7 @@
 # command line.
 arch = None
 compiler = None
+fortran_compiler = None
 dsymutil = None
 sdkroot = None
 make_path = None

>From 05ac607a92efbcaeda73b07bd535bb24fa0e6b5d Mon Sep 17 00:00:00 2001
From: Iasonaskrpr <[email protected]>
Date: Fri, 10 Jul 2026 22:33:34 +0300
Subject: [PATCH 5/7] [lldb] Addressed code quality comments

---
 lldb/packages/Python/lldbsuite/test/dotest_args.py      | 2 +-
 lldb/packages/Python/lldbsuite/test/make/Makefile.rules | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lldb/packages/Python/lldbsuite/test/dotest_args.py 
b/lldb/packages/Python/lldbsuite/test/dotest_args.py
index 49bd9fefc40c2..8791ddc377c65 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest_args.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest_args.py
@@ -54,7 +54,7 @@ def create_parser():
         dest="fortran_compiler",
         default="",
         help=textwrap.dedent(
-            """The fortran compiler used to build the test programs."""
+            """The Fortran compiler used to build the test programs."""
         ),
     )
     group.add_argument(
diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules 
b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
index 86e92f6ac6427..22eeeb24a59c1 100644
--- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -261,8 +261,8 @@ FFLAGS ?= $(DEBUG_INFO_FLAG) -O0
 # it adds `-gdwarf-{version}` to the CFLAGS environment variable which causes 
those tests
 # to fail. Strip any existing debug flags from CFLAGS and force -g0 to prevent 
this.
 ifeq "$(MAKE_NO_DEBUG_INFO)" "YES"
-    CFLAGS := $(filter-out -g%,$(CFLAGS)) -g0
-               FFLAGS := $(filter-out -g%,$(FFLAGS)) -g0
+  CFLAGS := $(filter-out -g%,$(CFLAGS)) -g0
+  FFLAGS := $(filter-out -g%,$(FFLAGS)) -g0
 endif
 CFLAGS += $(SYSROOT_FLAGS)
 FFLAGS += $(SYSROOT_FLAGS)
@@ -558,12 +558,12 @@ endif
 # Check if we have any Fortran source files
 #----------------------------------------------------------------------
 ifneq "$(strip $(F_SOURCES))" ""
-       ifeq "$(FC)" ""
+  ifeq "$(FC)" ""
     $(error "No Fortran compiler found for fortran tests")
   endif
   OBJECTS +=$(strip $(F_SOURCES:.f90=.o))
        # Override the linker with the Fortran compiler, LDC is not needed 
-       # currently so it is set to any
+       # currently so it is set to any.
        override LD := $(FC)
        override LDC := any
 endif

>From e55dc755320754b5972ab84b63e60d93d4763d58 Mon Sep 17 00:00:00 2001
From: Iasonaskrpr <[email protected]>
Date: Wed, 2 Sep 2026 21:37:46 +0300
Subject: [PATCH 6/7] [lldb] Switched candidateFortranCompilers order and
 --fortran-compiler help comment

---
 lldb/packages/Python/lldbsuite/test/dotest.py      | 2 +-
 lldb/packages/Python/lldbsuite/test/dotest_args.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py 
b/lldb/packages/Python/lldbsuite/test/dotest.py
index 4c0e708cc0b98..e01c001d2bf20 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -280,7 +280,7 @@ def parseOptionsAndInitTestdirs():
             sys.exit(-1)
     else:
         # If no Fortran compiler was explicitly specified, search for local 
fallbacks.
-        candidateFortranCompilers = ["flang-new", "flang", "gfortran"]
+        candidateFortranCompilers = ["flang", "flang-new", "gfortran"]
         for candidate in candidateFortranCompilers:
             if which(candidate):
                 configuration.fortran_compiler = candidate
diff --git a/lldb/packages/Python/lldbsuite/test/dotest_args.py 
b/lldb/packages/Python/lldbsuite/test/dotest_args.py
index 1ff58a40bd89a..037e00af37354 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest_args.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest_args.py
@@ -54,7 +54,7 @@ def create_parser():
         dest="fortran_compiler",
         default="",
         help=textwrap.dedent(
-            """The Fortran compiler used to build the test programs."""
+            """Specify the compiler used to build the inferior Fortran 
executables. The compiler path can be an executable basename or a full path to 
a compiler executable."""
         ),
     )
     group.add_argument(

>From e3443541231b9e7a3db167ab4de4bf178c202248 Mon Sep 17 00:00:00 2001
From: Iasonaskrpr <[email protected]>
Date: Thu, 3 Sep 2026 19:10:54 +0300
Subject: [PATCH 7/7] [lldb] Removed requirement for LLDB_ENABLE_FORTRAN

---
 lldb/test/API/CMakeLists.txt     | 15 ++++++---------
 lldb/test/API/lit.site.cfg.py.in |  1 -
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/lldb/test/API/CMakeLists.txt b/lldb/test/API/CMakeLists.txt
index 5166ca3193a8f..9634769dbaa88 100644
--- a/lldb/test/API/CMakeLists.txt
+++ b/lldb/test/API/CMakeLists.txt
@@ -88,19 +88,16 @@ else()
   set(LLDB_DEFAULT_TEST_COMPILER "")
 endif()
 
-if(LLDB_ENABLE_FORTRAN)
-  # Prefer the in-tree built target if available.
-  if(TARGET flang)
-    set(LLDB_DEFAULT_TEST_FORTRAN_COMPILER 
"${LLVM_TOOLS_BINARY_DIR}/flang${CMAKE_EXECUTABLE_SUFFIX}")
-  else()
-    set(LLDB_DEFAULT_TEST_FORTRAN_COMPILER "")
-  endif()
-
-  set(LLDB_TEST_FORTRAN_COMPILER "${LLDB_DEFAULT_TEST_FORTRAN_COMPILER}" CACHE 
PATH "Fortran Compiler to use for building LLDB test inferiors")
+# Prefer the in-tree built target if available.
+if(TARGET flang)
+  set(LLDB_DEFAULT_TEST_FORTRAN_COMPILER 
"${LLVM_TOOLS_BINARY_DIR}/flang${CMAKE_EXECUTABLE_SUFFIX}")
+else()
+  set(LLDB_DEFAULT_TEST_FORTRAN_COMPILER "")
 endif()
 
 set(LLDB_TEST_EXECUTABLE "${LLDB_DEFAULT_TEST_EXECUTABLE}" CACHE PATH "lldb 
executable used for testing")
 set(LLDB_TEST_COMPILER "${LLDB_DEFAULT_TEST_COMPILER}" CACHE PATH "C Compiler 
to use for building LLDB test inferiors (the C++ compiler will be inferred from 
this)")
+set(LLDB_TEST_FORTRAN_COMPILER "${LLDB_DEFAULT_TEST_FORTRAN_COMPILER}" CACHE 
PATH "Fortran compiler to use for building LLDB test inferiors")
 set(LLDB_TEST_DSYMUTIL "${LLDB_DEFAULT_TEST_DSYMUTIL}" CACHE PATH "dsymutil 
used for generating dSYM bundles")
 set(LLDB_TEST_MAKE "${LLDB_DEFAULT_TEST_MAKE}" CACHE PATH "make tool used for 
building test executables")
 set(LLDB_TEST_RESOURCE_DIR "" CACHE PATH "Clang resource directory for 
cross-compiling test inferiors")
diff --git a/lldb/test/API/lit.site.cfg.py.in b/lldb/test/API/lit.site.cfg.py.in
index c655f9b1dfd96..077d1df285c91 100644
--- a/lldb/test/API/lit.site.cfg.py.in
+++ b/lldb/test/API/lit.site.cfg.py.in
@@ -24,7 +24,6 @@ config.python_root_dir = "@Python3_ROOT_DIR@"
 config.lua_executable = "@LUA_EXECUTABLE@"
 config.lldb_lua_cpath = "@LLDB_LUA_CPATH@"
 config.lua_test_entry = "TestLuaAPI.py"
-config.lldb_enable_fortran = "@LLDB_ENABLE_FORTRAN@"
 config.dotest_common_args_str = 
lit_config.substitute("@LLDB_TEST_COMMON_ARGS@")
 config.dotest_user_args_str = lit_config.substitute("@LLDB_TEST_USER_ARGS@")
 config.lldb_platform_url = lit_config.substitute("@LLDB_TEST_PLATFORM_URL@")

_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to