brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 1807a3b Raw
31 lines · plain
1; REQUIRES: x86, non-root-user2;; Test a few properties not tested by thinlto-index-only.ll3 4; RUN: opt -module-summary %s -o %t1.o5; RUN: opt -module-summary %p/Inputs/thinlto.ll -o %t2.o6; RUN: opt -module-summary %p/Inputs/thinlto_empty.ll -o %t3.o7 8; Ensure lld generates error if unable to write to imports file.9; RUN: rm -f %t3.o.imports10; RUN: touch %t3.o.imports11; RUN: chmod 400 %t3.o.imports12; RUN: not ld.lld --plugin-opt=thinlto-index-only --plugin-opt=thinlto-emit-imports-files -shared %t1.o %t2.o %t3.o -o /dev/null 2>&1 | FileCheck -DMSG=%errc_EACCES %s --check-prefix=ERR13; ERR: 'cannot open {{.*}}3.o.imports': [[MSG]]14 15; RUN: rm -f %t1.o.imports %t2.o.imports rm -f %t3.o.imports16; RUN: ld.lld --plugin-opt=thinlto-emit-imports-files -shared %t1.o %t2.o %t3.o -o %t417; RUN: not ls %t1.o.imports18; RUN: not ls %t2.o.imports19; RUN: not ls %t3.o.imports20 21target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"22target triple = "x86_64-unknown-linux-gnu"23 24declare void @g(...)25 26define void @f() {27entry:28  call void (...) @g()29  ret void30}31