mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-16 17:01:43 +00:00
Add support for producing thin archives in llvm-lib.
I will send an entry in docs/CommandGuide for review today. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242533 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
96ac935e6d
commit
f82375c972
@ -141,7 +141,7 @@ int llvm::libDriverMain(llvm::ArrayRef<const char*> ArgsArr) {
|
||||
std::pair<StringRef, std::error_code> Result =
|
||||
llvm::writeArchive(getOutputPath(&Args, Members[0]), Members,
|
||||
/*WriteSymtab=*/true, object::Archive::K_GNU,
|
||||
/*Deterministic*/ true, /*Thin*/ false);
|
||||
/*Deterministic*/ true, Args.hasArg(OPT_llvmlibthin));
|
||||
|
||||
if (Result.second) {
|
||||
if (Result.first.empty())
|
||||
|
@ -12,6 +12,8 @@ class P<string name, string help> :
|
||||
def libpath: P<"libpath", "Object file search path">;
|
||||
def out : P<"out", "Path to file to write output">;
|
||||
|
||||
def llvmlibthin : F<"llvmlibthin">;
|
||||
|
||||
//==============================================================================
|
||||
// The flags below do nothing. They are defined only for lib.exe compatibility.
|
||||
//==============================================================================
|
||||
|
9
test/LibDriver/thin.test
Normal file
9
test/LibDriver/thin.test
Normal file
@ -0,0 +1,9 @@
|
||||
RUN: echo foo > %t
|
||||
|
||||
RUN: llvm-lib -out:%t.a %t
|
||||
RUN: FileCheck --check-prefix=FAT %s < %t.a
|
||||
FAT: !<arch>
|
||||
|
||||
RUN: llvm-lib -out:%t.thin.a -llvmlibthin %t
|
||||
RUN: FileCheck --check-prefix=THIN %s < %t.thin.a
|
||||
THIN: !<thin>
|
Loading…
x
Reference in New Issue
Block a user