brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 02d9e8e Raw
42 lines · plain
1## llvm-ar should be able to consume response files.2 3# RUN: echo 'contents' > %t.txt4# RUN: echo 'rc %t1.a %t.txt' > %t.response1.txt5# RUN: llvm-ar @%t.response1.txt6# RUN: llvm-ar p %t1.a | FileCheck %s --check-prefix=CONTENTS7 8## Quotes and Spaces.9# RUN: echo 'contents' > '%t space.txt'10## Python is used here to ensure the quotes are written to the response file11# RUN: %python -c "import os; open(r'%t.response2.txt', 'w').write(r'%t2.a \"%t space.txt\"'+ '\n')"12# RUN: llvm-ar rc @%t.response2.txt13# RUN: llvm-ar p %t2.a | FileCheck %s --check-prefix=CONTENTS14 15## Arguments after the response file.16# RUN: echo 'rc %t3.a' > %t.response3.txt17# RUN: llvm-ar @%t.response3.txt %t.txt18# RUN: llvm-ar p %t3.a | FileCheck %s --check-prefix=CONTENTS19 20## Newlines21# RUN: echo contents > %t.txt22# RUN: echo rc %t4.a > %t.newline.txt23# RUN: echo %t.txt >> %t.newline.txt24# RUN: llvm-ar @%t.newline.txt25# RUN: llvm-ar p %t4.a | FileCheck %s --check-prefix=CONTENTS26 27# CONTENTS: contents28 29## rsp-quoting30# RUN: not llvm-ar --rsp-quoting=foobar @%t.response1.txt 2>&1 | \31# RUN:   FileCheck  %s --check-prefix=ERROR32# ERROR: Invalid response file quoting style foobar33 34# RUN: echo -e 'rc %/t.a blah\\foo' > %t-rsp.txt35# RUN: not llvm-ar --rsp-quoting=windows @%t-rsp.txt 2>&1 | \36# RUN:   FileCheck -DMSG=%errc_ENOENT %s --check-prefix=WIN37# WIN: error: blah\foo: [[MSG]]38 39# RUN: not llvm-ar --rsp-quoting posix @%t-rsp.txt 2>&1 | \40# RUN:   FileCheck -DMSG=%errc_ENOENT %s --check-prefix=POSIX41# POSIX: error: blahfoo: [[MSG]]42