From c78cc588f41879ef37ec0a910bb16d9dfbd3d533 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Tue, 12 Aug 2025 16:56:39 +0000 Subject: [PATCH] review: allow PreserveDates --- llvm/lib/ObjCopy/ConfigManager.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/llvm/lib/ObjCopy/ConfigManager.cpp b/llvm/lib/ObjCopy/ConfigManager.cpp index fd82a7f60477..918daf8292f5 100644 --- a/llvm/lib/ObjCopy/ConfigManager.cpp +++ b/llvm/lib/ObjCopy/ConfigManager.cpp @@ -110,6 +110,9 @@ Expected ConfigManager::getXCOFFConfig() const { Expected ConfigManager::getDXContainerConfig() const { + // If a flag is listed below, then it may be implemented in the future. All + // other flags are not applicable and will be silently ignored for the + // DXContainer object file if (!Common.AddGnuDebugLink.empty() || Common.ExtractPartition || !Common.SplitDWO.empty() || !Common.SymbolsPrefix.empty() || !Common.SymbolsPrefixRemove.empty() || !Common.SymbolsToSkip.empty() || @@ -126,7 +129,7 @@ ConfigManager::getDXContainerConfig() const { !Common.SetSectionFlags.empty() || !Common.SetSectionType.empty() || !Common.SymbolsToRename.empty() || Common.ExtractDWO || Common.ExtractMainPartition || Common.OnlyKeepDebug || - Common.PreserveDates || Common.StripAllGNU || Common.StripDWO || + Common.StripAllGNU || Common.StripDWO || Common.StripDebug || Common.StripNonAlloc || Common.StripSections || Common.Weaken || Common.StripUnneeded || Common.DecompressDebugSections || Common.GapFill != 0 || Common.PadTo != 0 || @@ -137,5 +140,7 @@ ConfigManager::getDXContainerConfig() const { "no flags are supported yet, only basic copying is allowed"); } + // If a flag is listed here, then it has support for DXContainer: + // Common.PreserveDates return DXContainer; }