[PATCH] D120669: [llvm] add -r functionality to llvm-bitcode-strip

Richard Howell via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 2 07:10:50 PST 2022


rmaz added inline comments.


================
Comment at: llvm/tools/llvm-objcopy/ObjcopyOptions.cpp:1220-1223
+  if (!InputArgs.hasArg(BITCODE_STRIP_remove)) {
+    return createStringError(errc::invalid_argument,
+                             "llvm-bitcode-strip has no action specified");
+  }
----------------
jhenderson wrote:
> No braces for single-line if statements. I take it in the future, other options will provide different actions, and you just have to request one (or more) actions from the available set?
Yes, there are 2 other output options that I have not yet added:
```
       -m     Remove the bitcode from the __LLVM segment, leaving behind a marker.

       -l     Remove all of the native executable code, leaving the LLVM bitcode behind. In
              this case, bitcode_strip will take care to preserve the (__TEXT,__info_plist)
              section while removing the rest of the __TEXT segment.
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120669/new/

https://reviews.llvm.org/D120669



More information about the llvm-commits mailing list