llvm-project
24 строки · 1.1 Кб
1; REQUIRES: x86
2
3;; Check that changing the output path via thinlto-prefix-replace works
4; RUN: mkdir -p %t/oldpath
5; RUN: opt -module-summary %s -o %t/oldpath/thinlto_prefix_replace.o
6
7;; Ensure that there is no existing file at the new path, so we properly
8;; test the creation of the new file there.
9; RUN: rm -f %t/newpath/thinlto_prefix_replace.o.thinlto.bc
10; RUN: %lld --thinlto-index-only --thinlto-prefix-replace="%t/oldpath/;%t/newpath/" -dylib %t/oldpath/thinlto_prefix_replace.o -o %t/thinlto_prefix_replace
11; RUN: ls %t/newpath/thinlto_prefix_replace.o.thinlto.bc
12
13;; Ensure that lld generates error if prefix replace option does not have 'old;new' format.
14; RUN: rm -f %t/newpath/thinlto_prefix_replace.o.thinlto.bc
15; RUN: not %lld --thinlto-index-only --thinlto-prefix-replace=abc:def -dylib %t/oldpath/thinlto_prefix_replace.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR
16; ERR: --thinlto-prefix-replace= expects 'old;new' format, but got abc:def
17
18target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
19target triple = "x86_64-apple-darwin"
20
21define void @f() {
22entry:
23ret void
24}
25