summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-ar
diff options
context:
space:
mode:
authorOwen Reynolds <gbreynoo@gmail.com>2019-06-06 13:19:50 +0000
committerOwen Reynolds <gbreynoo@gmail.com>2019-06-06 13:19:50 +0000
commitbf5bca5bea5b75faa1e66db458382929fbe4e475 (patch)
tree261bebf18b2626df6b68c94d23d2a983df90e6a9 /llvm/tools/llvm-ar
parentdd2d1a168f49bd1bd20acd34ec43e7d803e848c2 (diff)
downloadbcm5719-llvm-bf5bca5bea5b75faa1e66db458382929fbe4e475.tar.gz
bcm5719-llvm-bf5bca5bea5b75faa1e66db458382929fbe4e475.zip
[llvm-ar] Create thin archives with MRI scripts
This patch implements the "CREATE_THIN" MRI script command, allowing thin archives to be created via MRI scripts. Differential Revision: https://reviews.llvm.org/D62919 llvm-svn: 362704
Diffstat (limited to 'llvm/tools/llvm-ar')
-rw-r--r--llvm/tools/llvm-ar/llvm-ar.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/tools/llvm-ar/llvm-ar.cpp b/llvm/tools/llvm-ar/llvm-ar.cpp
index 0731f35ac45..ea6d0410a63 100644
--- a/llvm/tools/llvm-ar/llvm-ar.cpp
+++ b/llvm/tools/llvm-ar/llvm-ar.cpp
@@ -952,7 +952,7 @@ static int performOperation(ArchiveOperation Operation,
}
static void runMRIScript() {
- enum class MRICommand { AddLib, AddMod, Create, Delete, Save, End, Invalid };
+ enum class MRICommand { AddLib, AddMod, Create, CreateThin, Delete, Save, End, Invalid };
ErrorOr<std::unique_ptr<MemoryBuffer>> Buf = MemoryBuffer::getSTDIN();
failIfError(Buf.getError());
@@ -976,6 +976,7 @@ static void runMRIScript() {
.Case("addlib", MRICommand::AddLib)
.Case("addmod", MRICommand::AddMod)
.Case("create", MRICommand::Create)
+ .Case("createthin", MRICommand::CreateThin)
.Case("delete", MRICommand::Delete)
.Case("save", MRICommand::Save)
.Case("end", MRICommand::End)
@@ -995,6 +996,9 @@ static void runMRIScript() {
case MRICommand::AddMod:
addMember(NewMembers, Rest);
break;
+ case MRICommand::CreateThin:
+ Thin = true;
+ LLVM_FALLTHROUGH;
case MRICommand::Create:
Create = true;
if (!ArchiveName.empty())
OpenPOWER on IntegriCloud