MachOConfig.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. #ifndef LLVM_TOOLS_LLVM_OBJCOPY_MACHO_MACHOCONFIG_H
  9. #define LLVM_TOOLS_LLVM_OBJCOPY_MACHO_MACHOCONFIG_H
  10. #include "llvm/ADT/DenseMap.h"
  11. #include "llvm/ADT/DenseSet.h"
  12. #include "llvm/ADT/StringRef.h"
  13. #include <vector>
  14. namespace llvm {
  15. namespace objcopy {
  16. // Mach-O specific configuration for copying/stripping a single file.
  17. struct MachOConfig {
  18. // Repeated options
  19. std::vector<StringRef> RPathToAdd;
  20. std::vector<StringRef> RPathToPrepend;
  21. DenseMap<StringRef, StringRef> RPathsToUpdate;
  22. DenseMap<StringRef, StringRef> InstallNamesToUpdate;
  23. DenseSet<StringRef> RPathsToRemove;
  24. // install-name-tool's id option
  25. Optional<StringRef> SharedLibId;
  26. // Boolean options
  27. bool StripSwiftSymbols = false;
  28. bool KeepUndefined = false;
  29. // install-name-tool's --delete_all_rpaths
  30. bool RemoveAllRpaths = false;
  31. };
  32. } // namespace objcopy
  33. } // namespace llvm
  34. #endif // LLVM_TOOLS_LLVM_OBJCOPY_MACHO_MACHOCONFIG_H