1 //===- MachOConfig.h --------------------------------------------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #ifndef LLVM_OBJCOPY_MACHO_MACHOCONFIG_H 10 #define LLVM_OBJCOPY_MACHO_MACHOCONFIG_H 11 12 #include "llvm/ADT/DenseMap.h" 13 #include "llvm/ADT/DenseSet.h" 14 #include "llvm/ADT/StringRef.h" 15 #include <vector> 16 17 namespace llvm { 18 namespace objcopy { 19 20 // Mach-O specific configuration for copying/stripping a single file. 21 struct MachOConfig { 22 // Repeated options 23 std::vector<StringRef> RPathToAdd; 24 std::vector<StringRef> RPathToPrepend; 25 DenseMap<StringRef, StringRef> RPathsToUpdate; 26 DenseMap<StringRef, StringRef> InstallNamesToUpdate; 27 DenseSet<StringRef> RPathsToRemove; 28 29 // install-name-tool's id option 30 Optional<StringRef> SharedLibId; 31 32 // Segments to remove if they are empty 33 DenseSet<StringRef> EmptySegmentsToRemove; 34 35 // Boolean options 36 bool StripSwiftSymbols = false; 37 bool KeepUndefined = false; 38 39 // install-name-tool's --delete_all_rpaths 40 bool RemoveAllRpaths = false; 41 }; 42 43 } // namespace objcopy 44 } // namespace llvm 45 46 #endif // LLVM_OBJCOPY_MACHO_MACHOCONFIG_H 47