[ELF][ARM] Increase default max-page-size from 4096 to 6536
[llvm-project.git] / lld / wasm / Config.h
blob1ba28899e64dbec4d2ca51302de2ff027f98a8ec
1 //===- Config.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 LLD_WASM_CONFIG_H
10 #define LLD_WASM_CONFIG_H
12 #include "llvm/ADT/StringRef.h"
13 #include "llvm/ADT/StringSet.h"
14 #include "llvm/BinaryFormat/Wasm.h"
15 #include "llvm/Support/CachePruning.h"
17 namespace lld {
18 namespace wasm {
20 // This struct contains the global configuration for the linker.
21 // Most fields are direct mapping from the command line options
22 // and such fields have the same name as the corresponding options.
23 // Most fields are initialized by the driver.
24 struct Configuration {
25 bool allowUndefined;
26 bool checkFeatures;
27 bool compressRelocations;
28 bool demangle;
29 bool disableVerify;
30 bool emitRelocs;
31 bool exportAll;
32 bool exportDynamic;
33 bool exportTable;
34 bool growableTable;
35 bool gcSections;
36 bool importMemory;
37 bool sharedMemory;
38 bool importTable;
39 bool mergeDataSegments;
40 bool pie;
41 bool printGcSections;
42 bool relocatable;
43 bool saveTemps;
44 bool shared;
45 bool stripAll;
46 bool stripDebug;
47 bool stackFirst;
48 bool trace;
49 uint64_t globalBase;
50 uint64_t initialMemory;
51 uint64_t maxMemory;
52 uint64_t zStackSize;
53 unsigned ltoPartitions;
54 unsigned ltoo;
55 unsigned optimize;
56 llvm::StringRef thinLTOJobs;
58 llvm::StringRef entry;
59 llvm::StringRef outputFile;
60 llvm::StringRef thinLTOCacheDir;
62 llvm::StringSet<> allowUndefinedSymbols;
63 llvm::StringSet<> exportedSymbols;
64 std::vector<llvm::StringRef> searchPaths;
65 llvm::CachePruningPolicy thinLTOCachePolicy;
66 llvm::Optional<std::vector<std::string>> features;
68 // The following config options do not directly correspond to any
69 // particualr command line options.
71 // True if we are creating position-independent code.
72 bool isPic;
74 // 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
76 // for shared libraries (since they always added to a dynamic offset at
77 // runtime).
78 uint32_t tableBase = 0;
81 // The only instance of Configuration struct.
82 extern Configuration *config;
84 } // namespace wasm
85 } // namespace lld
87 #endif