[llvm] [DirectX] Add `only-section` to `llvm-objcopy` for `DXContainer` (PR #156372)
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 4 09:47:58 PDT 2025
================
@@ -28,6 +28,13 @@ static Error handleArgs(const CommonConfig &Config, Object &Obj) {
return Config.ToRemove.matches(P.Name);
};
+ if (!Config.OnlySection.empty())
+ RemovePred = [&Config](const Part &P) {
+ // Explicitly keep these sections regardless of previous removes and
+ // remove everything else.
----------------
bogner wrote:
Can/should we error if both `--remove-section` and `--only-section` are specified together?
https://github.com/llvm/llvm-project/pull/156372
More information about the llvm-commits
mailing list