projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Initial support for writing thin archives.
[oota-llvm.git]
/
tools
/
llvm-ar
/
llvm-ar.cpp
diff --git
a/tools/llvm-ar/llvm-ar.cpp
b/tools/llvm-ar/llvm-ar.cpp
index 2c9668c63b8cc18fcc3f0e2b6298d0439433523b..0e3c4fdc2ce90b59df3b6a35b7886d668938f697 100644
(file)
--- a/
tools/llvm-ar/llvm-ar.cpp
+++ b/
tools/llvm-ar/llvm-ar.cpp
@@
-130,6
+130,7
@@
static bool OnlyUpdate = false; ///< 'u' modifier
static bool Verbose = false; ///< 'v' modifier
static bool Symtab = true; ///< 's' modifier
static bool Deterministic = true; ///< 'D' and 'U' modifiers
static bool Verbose = false; ///< 'v' modifier
static bool Symtab = true; ///< 's' modifier
static bool Deterministic = true; ///< 'D' and 'U' modifiers
+static bool Thin = false; ///< 'T' modifier
// Relative Positional Argument (for insert/move). This variable holds
// the name of the archive member to which the 'a', 'b' or 'i' modifier
// Relative Positional Argument (for insert/move). This variable holds
// the name of the archive member to which the 'a', 'b' or 'i' modifier
@@
-252,6
+253,9
@@
static ArchiveOperation parseCommandLine() {
case 'U':
Deterministic = false;
break;
case 'U':
Deterministic = false;
break;
+ case 'T':
+ Thin = true;
+ break;
default:
cl::PrintHelpMessage();
}
default:
cl::PrintHelpMessage();
}
@@
-590,15
+594,15
@@
performWriteOperation(ArchiveOperation Operation, object::Archive *OldArchive,
break;
}
if (NewMembersP) {
break;
}
if (NewMembersP) {
- std::pair<StringRef, std::error_code> Result =
-
writeArchive(ArchiveName, *NewMembersP, Symtab, Kind, Deterministic
);
+ std::pair<StringRef, std::error_code> Result =
writeArchive(
+
ArchiveName, *NewMembersP, Symtab, Kind, Deterministic, Thin
);
failIfError(Result.second, Result.first);
return;
}
std::vector<NewArchiveIterator> NewMembers =
computeNewArchiveMembers(Operation, OldArchive);
auto Result =
failIfError(Result.second, Result.first);
return;
}
std::vector<NewArchiveIterator> NewMembers =
computeNewArchiveMembers(Operation, OldArchive);
auto Result =
- writeArchive(ArchiveName, NewMembers, Symtab, Kind, Deterministic);
+ writeArchive(ArchiveName, NewMembers, Symtab, Kind, Deterministic
, Thin
);
failIfError(Result.second, Result.first);
}
failIfError(Result.second, Result.first);
}