Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:16

0001 //===- MachOConfig.h --------------------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLVM_OBJCOPY_MACHO_MACHOCONFIG_H
0010 #define LLVM_OBJCOPY_MACHO_MACHOCONFIG_H
0011 
0012 #include "llvm/ADT/DenseMap.h"
0013 #include "llvm/ADT/DenseSet.h"
0014 #include "llvm/ADT/StringRef.h"
0015 #include <optional>
0016 #include <vector>
0017 
0018 namespace llvm {
0019 namespace objcopy {
0020 
0021 // Mach-O specific configuration for copying/stripping a single file.
0022 struct MachOConfig {
0023   // Repeated options
0024   std::vector<StringRef> RPathToAdd;
0025   std::vector<StringRef> RPathToPrepend;
0026   DenseMap<StringRef, StringRef> RPathsToUpdate;
0027   DenseMap<StringRef, StringRef> InstallNamesToUpdate;
0028   DenseSet<StringRef> RPathsToRemove;
0029 
0030   // install-name-tool's id option
0031   std::optional<StringRef> SharedLibId;
0032 
0033   // Segments to remove if they are empty
0034   DenseSet<StringRef> EmptySegmentsToRemove;
0035 
0036   // Boolean options
0037   bool StripSwiftSymbols = false;
0038   bool KeepUndefined = false;
0039 
0040   // install-name-tool's --delete_all_rpaths
0041   bool RemoveAllRpaths = false;
0042 };
0043 
0044 } // namespace objcopy
0045 } // namespace llvm
0046 
0047 #endif // LLVM_OBJCOPY_MACHO_MACHOCONFIG_H