summaryrefslogtreecommitdiff
path: root/test/Object/mri1.test
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-10-10 18:33:51 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-10-10 18:33:51 +0000
commitf02687d9eb9dca1890ada305c609daf21e8cd846 (patch)
treee977a6c5dbec9faa5fa849dc56a7ca3d6f9ac08d /test/Object/mri1.test
parentb144f27c8f7fb934fa80ae8fe1fe71c0df219e16 (diff)
llvm-ar: Start adding support for mri scripts.
I was quiet surprised to find this feature being used. Fortunately the uses I found look fairly simple. In fact, they are just a very verbose version of the regular ar commands. Start implementing it then by parsing the script and setting the command variables as if we had a regular command line. This patch adds just enough support to create an empty archive and do a bit of error checking. In followup patches I will implement at least addmod and addlib. From the description in the manual, even the more general case should not be too hard to implement if needed. The features that don't map 1:1 to the simple command line are * Reading from multiple archives. * Creating multiple archives. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219521 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Object/mri1.test')
-rw-r--r--test/Object/mri1.test6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Object/mri1.test b/test/Object/mri1.test
new file mode 100644
index 00000000000..3d27db7996a
--- /dev/null
+++ b/test/Object/mri1.test
@@ -0,0 +1,6 @@
+; RUN: echo create %t.a > %t.mri
+; RUN: echo save >> %t.mri
+; RUN: echo end >> %t.mri
+
+; RUN: llvm-ar -M < %t.mri
+; RUN: llvm-ar t %t.a