[flang-commits] [flang] 71c2feb - Support for -fsplit-lto-unit option in flang driver (#204904)

via flang-commits flang-commits at lists.llvm.org
Sun Jun 21 00:04:34 PDT 2026


Author: shivaramaarao
Date: 2026-06-21T12:34:29+05:30
New Revision: 71c2feb30426af725dd93297b9dccc18f8210a0e

URL: https://github.com/llvm/llvm-project/commit/71c2feb30426af725dd93297b9dccc18f8210a0e
DIFF: https://github.com/llvm/llvm-project/commit/71c2feb30426af725dd93297b9dccc18f8210a0e.diff

LOG: Support for -fsplit-lto-unit option in flang driver (#204904)

Fix for buildbot failures in #202858

This commit fixes a regression introduced in commit
12aefe26cedd9a8f94546cc1f2be285cfddcc861 (Support for -fsplit-lto-unit
option in flang driver). When the compiler is built only for aarch64 one
of the testcase failed.

Added explicit check %if x86-registered-target for this testcase to
resolve the issue.

Added: 
    

Modified: 
    flang/test/Integration/split-lto-unit-2.f90

Removed: 
    


################################################################################
diff  --git a/flang/test/Integration/split-lto-unit-2.f90 b/flang/test/Integration/split-lto-unit-2.f90
index 3ccfa973d4cf9..843c6b5e717f5 100644
--- a/flang/test/Integration/split-lto-unit-2.f90
+++ b/flang/test/Integration/split-lto-unit-2.f90
@@ -1,19 +1,19 @@
 ! Check that -flto=thin without -fsplit-lto-unit has EnableSplitLTOUnit = 0
 ! RUN: %flang -flto=thin  -S -o - %s |  FileCheck %s --check-prefix=SPLIT0
-! RUN: %flang -flto=thin --target=x86_64-linux-gnu -S -o - %s |  FileCheck %s --check-prefix=SPLIT0
-! RUN: %flang -flto=thin --target=x86_64-apple-macosx -S -o - %s | FileCheck %s --check-prefix=SPLIT0
+! RUN: %if x86-registered-target %{ %flang -flto=thin --target=x86_64-linux-gnu -S -o - %s |  FileCheck %s --check-prefix=SPLIT0 %}
+! RUN: %if x86-registered-target %{ %flang -flto=thin --target=x86_64-apple-macosx -S -o - %s | FileCheck %s --check-prefix=SPLIT0 %}
 
 ! Check that -flto=thin with -fsplit-lto-unit has EnableSplitLTOUnit = 1
 ! RUN: %flang -flto=thin -fsplit-lto-unit -S -o - %s | FileCheck %s --check-prefix=SPLIT1
-! RUN: %flang -flto=thin --target=x86_64-linux-gnu -fsplit-lto-unit -S -o - %s | FileCheck %s --check-prefix=SPLIT1
-! RUN: %flang -flto=thin --target=x86_64-apple-macosx -fsplit-lto-unit -S -o - %s | FileCheck %s --check-prefix=SPLIT1
+! RUN: %if x86-registered-target %{ %flang -flto=thin --target=x86_64-linux-gnu -fsplit-lto-unit -S -o - %s | FileCheck %s --check-prefix=SPLIT1 %}
+! RUN: %if x86-registered-target %{ %flang -flto=thin --target=x86_64-apple-macosx -fsplit-lto-unit -S -o - %s | FileCheck %s --check-prefix=SPLIT1 %}
 
 ! Check that regular LTO has EnableSplitLTOUnit = 1 
 ! RUN: %flang -flto -S -o - %s | FileCheck %s --implicit-check-not="EnableSplitLTOUnit" --check-prefix=SPLIT1
-! RUN: %flang -flto --target=x86_64-linux-gnu -S -o - %s |  FileCheck %s --check-prefix=SPLIT1
+! RUN: %if x86-registered-target %{ %flang -flto --target=x86_64-linux-gnu -S -o - %s |  FileCheck %s --check-prefix=SPLIT1 %}
 
 ! Check that regular LTO has no EnableSplitLTOUnit for apple targets
-! RUN: %flang -flto --target=x86_64-apple-macosx -S -o - %s | FileCheck %s --check-prefix=NOSPLIT
+! RUN: %if x86-registered-target %{ %flang -flto --target=x86_64-apple-macosx -S -o - %s | FileCheck %s --check-prefix=NOSPLIT %}
 
 ! SPLIT0: !{i32 1, !"EnableSplitLTOUnit", i32 0}
 ! SPLIT1: !{i32 1, !"EnableSplitLTOUnit", i32 1}


        


More information about the flang-commits mailing list