summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objcopy/ObjcopyOpts.td
diff options
context:
space:
mode:
authorJordan Rupprecht <rupprecht@google.com>2018-11-01 17:36:37 +0000
committerJordan Rupprecht <rupprecht@google.com>2018-11-01 17:36:37 +0000
commitfc780bbb1604859511dc74fc4b8986bb11194019 (patch)
tree7923ebcff0253e1a9b045bee84599d32be5da899 /llvm/tools/llvm-objcopy/ObjcopyOpts.td
parentcc1e9c414bd2109927ac37fb46c1c4b3967682e6 (diff)
downloadbcm5719-llvm-fc780bbb1604859511dc74fc4b8986bb11194019.tar.gz
bcm5719-llvm-fc780bbb1604859511dc74fc4b8986bb11194019.zip
[llvm-objcopy] Support --{enable,disable}-deterministic-archives
Summary: ar and objcopy/strip all support configuring whether archives are written deterministically (timestamps/UIDs/GIDs/etc zero'd). This has been ported to llvm-ar (the U/D modifiers) but not yet to llvm-objcopy/strip. Reviewers: jakehehrlich, jhenderson, alexshap Reviewed By: jhenderson Subscribers: ruiu, mgrang, llvm-commits Differential Revision: https://reviews.llvm.org/D53913 llvm-svn: 345859
Diffstat (limited to 'llvm/tools/llvm-objcopy/ObjcopyOpts.td')
-rw-r--r--llvm/tools/llvm-objcopy/ObjcopyOpts.td16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/tools/llvm-objcopy/ObjcopyOpts.td b/llvm/tools/llvm-objcopy/ObjcopyOpts.td
index 8ed6df9a9f6..3b8453beecb 100644
--- a/llvm/tools/llvm-objcopy/ObjcopyOpts.td
+++ b/llvm/tools/llvm-objcopy/ObjcopyOpts.td
@@ -35,6 +35,22 @@ defm split_dwo
"<dwo-file>, then strip-dwo on the input file">,
MetaVarName<"dwo-file">;
+def enable_deterministic_archives
+ : Flag<["-", "--"], "enable-deterministic-archives">,
+ HelpText<"Enable deterministic mode when copying archives (use zero for "
+ "UIDs, GIDs, and timestamps).">;
+def D : Flag<["-"], "D">,
+ Alias<enable_deterministic_archives>,
+ HelpText<"Alias for --enable-deterministic-archives">;
+
+def disable_deterministic_archives
+ : Flag<["-", "--"], "disable-deterministic-archives">,
+ HelpText<"Disable deterministic mode when copying archives (use real "
+ "values for UIDs, GIDs, and timestamps).">;
+def U : Flag<["-"], "U">,
+ Alias<disable_deterministic_archives>,
+ HelpText<"Alias for --disable-deterministic-archives">;
+
def preserve_dates : Flag<[ "-", "--" ], "preserve-dates">,
HelpText<"Preserve access and modification timestamps">;
OpenPOWER on IntegriCloud