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"
|
|
|
|
|
|
|
|
namespace lld {
|
|
|
|
namespace wasm {
|
|
|
|
|
2018-03-28 01:38:51 +08:00
|
|
|
enum class ExposeAs { IMPORT, EXPORT, NONE };
|
|
|
|
|
2017-11-18 02:14:09 +08:00
|
|
|
struct Configuration {
|
2017-11-29 04:27:21 +08:00
|
|
|
bool AllowUndefined;
|
2017-11-30 09:40:08 +08:00
|
|
|
bool CheckSignatures;
|
2017-11-29 04:27:21 +08:00
|
|
|
bool Demangle;
|
2018-01-31 09:45:47 +08:00
|
|
|
bool GcSections;
|
2017-11-29 04:27:21 +08:00
|
|
|
bool ImportMemory;
|
2018-01-31 09:45:47 +08:00
|
|
|
bool PrintGcSections;
|
2017-11-29 04:27:21 +08:00
|
|
|
bool Relocatable;
|
|
|
|
bool StripAll;
|
|
|
|
bool StripDebug;
|
2018-03-28 01:38:51 +08:00
|
|
|
ExposeAs Table;
|
2017-11-29 04:27:21 +08:00
|
|
|
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-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
|
|
|
};
|
|
|
|
|
|
|
|
// The only instance of Configuration struct.
|
|
|
|
extern Configuration *Config;
|
|
|
|
|
|
|
|
} // namespace wasm
|
|
|
|
} // namespace lld
|
|
|
|
|
|
|
|
#endif
|