[clang] [flang] [flang][Driver] Enables lto-partitions and fat-lto-object. (PR #158125)

Abid Qadeer via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 17 02:51:34 PDT 2025


================
@@ -0,0 +1,19 @@
+! UNSUPPORTED: system-windows
+! check flto-partitions is passed to lld, fc1
+! RUN: %flang -### -fuse-ld=lld -flto=full -flto-partitions=16 %s 2>&1 | FileCheck %s --check-prefixes=LLD-PART,FC1-PART
+
+! FC1-PART: "-fc1"
+! FC1-PART-SAME: "-flto=full"
+! FC1-PART-SAME: "-flto-partitions=16"
+! LLD-PART: ld.lld
+! LLD-PART-SAME: "--lto-partitions=16"
+
+! check fat-lto-objects is passed to lld, fc1
+! RUN: %flang -### -fuse-ld=lld -flto -ffat-lto-objects %s 2>&1 | FileCheck %s --check-prefixes=LLD-FAT,FC1-FAT
+
+! FC1-FAT: "-fc1"
+! FC1-FAT-SAME: "-flto=full"
+! FC1-FAT-SAME: "-ffat-lto-objects"
+! LLD-FAT: ld.lld
+! LLD-FAT-SAME: "--fat-lto-objects"
+end program
----------------
abidh wrote:

No new line at the end of the file.

https://github.com/llvm/llvm-project/pull/158125


More information about the cfe-commits mailing list