2017-11-18 02:14:09 +08:00
|
|
|
//===- 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"
|
2017-11-30 06:21:37 +08:00
|
|
|
#include "llvm/ADT/StringSet.h"
|
2017-11-18 02:14:09 +08:00
|
|
|
#include "llvm/BinaryFormat/Wasm.h"
|
|
|
|
|
|
|
|
#include "Symbols.h"
|
|
|
|
|
|
|
|
using llvm::wasm::WasmGlobal;
|
|
|
|
|
|
|
|
namespace lld {
|
|
|
|
namespace wasm {
|
|
|
|
|
|
|
|
struct Configuration {
|
2017-11-29 04:27:21 +08:00
|
|
|
bool AllowUndefined;
|
|
|
|
bool Demangle;
|
|
|
|
bool EmitRelocs;
|
|
|
|
bool ImportMemory;
|
|
|
|
bool Relocatable;
|
|
|
|
bool StripAll;
|
|
|
|
bool StripDebug;
|
|
|
|
uint32_t GlobalBase;
|
|
|
|
uint32_t InitialMemory;
|
|
|
|
uint32_t MaxMemory;
|
|
|
|
uint32_t ZStackSize;
|
2017-11-18 02:14:09 +08:00
|
|
|
llvm::StringRef Entry;
|
|
|
|
llvm::StringRef OutputFile;
|
2017-11-29 04:27:21 +08:00
|
|
|
llvm::StringRef Sysroot;
|
2017-11-18 02:14:09 +08:00
|
|
|
|
2017-11-30 06:21:37 +08:00
|
|
|
llvm::StringSet<> AllowUndefinedSymbols;
|
2017-11-29 04:27:21 +08:00
|
|
|
std::vector<llvm::StringRef> SearchPaths;
|
2017-11-18 02:14:09 +08:00
|
|
|
std::vector<std::pair<Symbol *, WasmGlobal>> SyntheticGlobals;
|
|
|
|
};
|
|
|
|
|
|
|
|
// The only instance of Configuration struct.
|
|
|
|
extern Configuration *Config;
|
|
|
|
|
|
|
|
} // namespace wasm
|
|
|
|
} // namespace lld
|
|
|
|
|
|
|
|
#endif
|