Mercurial > hg > CbC > CbC_llvm
comparison lld/wasm/Config.h @ 221:79ff65ed7e25
LLVM12 Original
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 15 Jun 2021 19:15:29 +0900 |
parents | 0572611fdcc8 |
children | 5f17cb93ff66 |
comparison
equal
deleted
inserted
replaced
220:42394fc6a535 | 221:79ff65ed7e25 |
---|---|
15 #include "llvm/Support/CachePruning.h" | 15 #include "llvm/Support/CachePruning.h" |
16 | 16 |
17 namespace lld { | 17 namespace lld { |
18 namespace wasm { | 18 namespace wasm { |
19 | 19 |
20 // For --unresolved-symbols. | |
21 // The `ImportFuncs` mode is an additional mode that corresponds to the | |
22 // --allow-undefined flag which turns undefined functions in imports | |
23 // as opposed ed to Ignore or Warn which turn them into unreachables. | |
24 enum class UnresolvedPolicy { ReportError, Warn, Ignore, ImportFuncs }; | |
25 | |
20 // This struct contains the global configuration for the linker. | 26 // This struct contains the global configuration for the linker. |
21 // Most fields are direct mapping from the command line options | 27 // Most fields are direct mapping from the command line options |
22 // and such fields have the same name as the corresponding options. | 28 // and such fields have the same name as the corresponding options. |
23 // Most fields are initialized by the driver. | 29 // Most fields are initialized by the driver. |
24 struct Configuration { | 30 struct Configuration { |
25 bool allowUndefined; | 31 bool bsymbolic; |
26 bool checkFeatures; | 32 bool checkFeatures; |
27 bool compressRelocations; | 33 bool compressRelocations; |
28 bool demangle; | 34 bool demangle; |
29 bool disableVerify; | 35 bool disableVerify; |
36 bool experimentalPic; | |
30 bool emitRelocs; | 37 bool emitRelocs; |
31 bool exportAll; | 38 bool exportAll; |
32 bool exportDynamic; | 39 bool exportDynamic; |
33 bool exportTable; | 40 bool exportTable; |
34 bool growableTable; | 41 bool growableTable; |
35 bool gcSections; | 42 bool gcSections; |
36 bool importMemory; | 43 bool importMemory; |
37 bool sharedMemory; | 44 bool sharedMemory; |
38 bool importTable; | 45 bool importTable; |
46 llvm::Optional<bool> is64; | |
39 bool mergeDataSegments; | 47 bool mergeDataSegments; |
40 bool pie; | 48 bool pie; |
41 bool printGcSections; | 49 bool printGcSections; |
42 bool relocatable; | 50 bool relocatable; |
43 bool saveTemps; | 51 bool saveTemps; |
52 uint64_t zStackSize; | 60 uint64_t zStackSize; |
53 unsigned ltoPartitions; | 61 unsigned ltoPartitions; |
54 unsigned ltoo; | 62 unsigned ltoo; |
55 unsigned optimize; | 63 unsigned optimize; |
56 llvm::StringRef thinLTOJobs; | 64 llvm::StringRef thinLTOJobs; |
65 bool ltoNewPassManager; | |
66 bool ltoDebugPassManager; | |
67 UnresolvedPolicy unresolvedSymbols; | |
57 | 68 |
58 llvm::StringRef entry; | 69 llvm::StringRef entry; |
70 llvm::StringRef mapFile; | |
59 llvm::StringRef outputFile; | 71 llvm::StringRef outputFile; |
60 llvm::StringRef thinLTOCacheDir; | 72 llvm::StringRef thinLTOCacheDir; |
61 | 73 |
62 llvm::StringSet<> allowUndefinedSymbols; | 74 llvm::StringSet<> allowUndefinedSymbols; |
63 llvm::StringSet<> exportedSymbols; | 75 llvm::StringSet<> exportedSymbols; |
76 std::vector<llvm::StringRef> requiredExports; | |
64 std::vector<llvm::StringRef> searchPaths; | 77 std::vector<llvm::StringRef> searchPaths; |
65 llvm::CachePruningPolicy thinLTOCachePolicy; | 78 llvm::CachePruningPolicy thinLTOCachePolicy; |
66 llvm::Optional<std::vector<std::string>> features; | 79 llvm::Optional<std::vector<std::string>> features; |
67 | 80 |
68 // The following config options do not directly correspond to any | 81 // The following config options do not directly correspond to any |
69 // particualr command line options. | 82 // particualr command line options. |
70 | 83 |
71 // True if we are creating position-independent code. | 84 // True if we are creating position-independent code. |
72 bool isPic; | 85 bool isPic; |
86 | |
87 // True if we have an MVP input that uses __indirect_function_table and which | |
88 // requires it to be allocated to table number 0. | |
89 bool legacyFunctionTable = false; | |
73 | 90 |
74 // The table offset at which to place function addresses. We reserve zero | 91 // The table offset at which to place function addresses. We reserve zero |
75 // for the null function pointer. This gets set to 1 for executables and 0 | 92 // for the null function pointer. This gets set to 1 for executables and 0 |
76 // for shared libraries (since they always added to a dynamic offset at | 93 // for shared libraries (since they always added to a dynamic offset at |
77 // runtime). | 94 // runtime). |