[sanitizer] Improve FreeBSD ASLR detection
[llvm-project.git] / llvm / tools / llvm-objcopy / MachO / MachOConfig.h
blob93f9facfcf0bb1d21f9f0582ae153cb6a41c55ab
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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_TOOLS_LLVM_OBJCOPY_MACHO_MACHOCONFIG_H
10 #define LLVM_TOOLS_LLVM_OBJCOPY_MACHO_MACHOCONFIG_H
12 #include "llvm/ADT/DenseMap.h"
13 #include "llvm/ADT/DenseSet.h"
14 #include "llvm/ADT/StringRef.h"
15 #include <vector>
17 namespace llvm {
18 namespace objcopy {
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;
29 // install-name-tool's id option
30 Optional<StringRef> SharedLibId;
32 // Boolean options
33 bool StripSwiftSymbols = false;
34 bool KeepUndefined = false;
36 // install-name-tool's --delete_all_rpaths
37 bool RemoveAllRpaths = false;
40 } // namespace objcopy
41 } // namespace llvm
43 #endif // LLVM_TOOLS_LLVM_OBJCOPY_MACHO_MACHOCONFIG_H