Skip to content

Conversation

@quic-akaryaki
Copy link
Contributor

This is a follow-up to #138203. The added test used lld but lld is not always available, which breaks builds. Make the test use llvm-lto2. Also make the test a bit more similar to other tests in the same directory.

This is a follow-up to llvm#138203. The added test used lld but lld is
not always available. Switch to using llvm-lto2.
@llvmbot llvmbot added the LTO Link time optimization (regular/full LTO or ThinLTO) label May 14, 2025
@quic-akaryaki quic-akaryaki requested a review from nikic May 14, 2025 16:34
@llvmbot
Copy link
Member

llvmbot commented May 14, 2025

@llvm/pr-subscribers-lto

Author: Alexey Karyakin (quic-akaryaki)

Changes

This is a follow-up to #138203. The added test used lld but lld is not always available, which breaks builds. Make the test use llvm-lto2. Also make the test a bit more similar to other tests in the same directory.


Full diff: https://github.com/llvm/llvm-project/pull/139928.diff

1 Files Affected:

  • (modified) llvm/test/ThinLTO/X86/cache-emit-asm.ll (+2-2)
diff --git a/llvm/test/ThinLTO/X86/cache-emit-asm.ll b/llvm/test/ThinLTO/X86/cache-emit-asm.ll
index ee7484053ca2e..b6e5ca25a637d 100644
--- a/llvm/test/ThinLTO/X86/cache-emit-asm.ll
+++ b/llvm/test/ThinLTO/X86/cache-emit-asm.ll
@@ -2,9 +2,9 @@
 ;; as crashes or sanitizer errors. MCAsmStreamer has specific assumptions about
 ;; the lifetime of the output stream that are easy to overlook (see #138194).
 
-; RUN: rm -rf %t.cache
+; RUN: rm -rf %t && mkdir -p %t
 ; RUN: opt -module-hash -module-summary -thinlto-bc %s -o %t1.bc
-; RUN: ld.lld --thinlto-cache-dir=%t.cache --lto-emit-asm %t1.bc
+; RUN: llvm-lto2 run -cache-dir %t/cache --filetype=asm -o %t.o %t1.bc -r=%t1.bc,globalfunc
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"

@quic-akaryaki quic-akaryaki merged commit 6049db0 into llvm:main May 14, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LTO Link time optimization (regular/full LTO or ThinLTO)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants