diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:12:21 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:12:21 +0000 |
commit | eb1ff93d02b5f17b6b409e83c6d9be585f4a04b3 (patch) | |
tree | 7490b4a8943293f251ad733465936e6ec302b3e9 /wasm/Config.h | |
parent | bafea25f368c63f0b39789906adfed6e39219e64 (diff) |
Notes
Diffstat (limited to 'wasm/Config.h')
-rw-r--r-- | wasm/Config.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/wasm/Config.h b/wasm/Config.h new file mode 100644 index 000000000000..82f49ce175bb --- /dev/null +++ b/wasm/Config.h @@ -0,0 +1,51 @@ +//===- Config.h -------------------------------------------------*- C++ -*-===// +// +// The LLVM Linker +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLD_WASM_CONFIG_H +#define LLD_WASM_CONFIG_H + +#include "llvm/ADT/StringRef.h" +#include "llvm/ADT/StringSet.h" +#include "llvm/BinaryFormat/Wasm.h" + +#include "Symbols.h" + +using llvm::wasm::WasmGlobal; + +namespace lld { +namespace wasm { + +struct Configuration { + bool AllowUndefined; + bool CheckSignatures; + bool Demangle; + bool EmitRelocs; + bool ImportMemory; + bool Relocatable; + bool StripAll; + bool StripDebug; + uint32_t GlobalBase; + uint32_t InitialMemory; + uint32_t MaxMemory; + uint32_t ZStackSize; + llvm::StringRef Entry; + llvm::StringRef OutputFile; + + llvm::StringSet<> AllowUndefinedSymbols; + std::vector<llvm::StringRef> SearchPaths; + Symbol *StackPointerSymbol = nullptr; +}; + +// The only instance of Configuration struct. +extern Configuration *Config; + +} // namespace wasm +} // namespace lld + +#endif |