llvm-capstone/lld/wasm/Config.h
Sam Clegg 177b458c8a [WebAssembly] Add --export-all flag
This causes all symbols to be exported in the final wasm binary
even if they were not compiled with default visibility.

This feature is useful for the emscripten toolchain that has a
corresponding EXPORT_ALL feature which allows the JS code to
interact with all C function.

Differential Revision: https://reviews.llvm.org/D47806

llvm-svn: 334157
2018-06-07 01:27:07 +00:00

62 lines
1.4 KiB
C++

//===- 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 "llvm/Support/CachePruning.h"
namespace lld {
namespace wasm {
struct Configuration {
bool AllowUndefined;
bool CompressRelocTargets;
bool Demangle;
bool DisableVerify;
bool ExportAll;
bool ExportTable;
bool GcSections;
bool ImportMemory;
bool ImportTable;
bool MergeDataSegments;
bool PrintGcSections;
bool Relocatable;
bool SaveTemps;
bool StripAll;
bool StripDebug;
bool StackFirst;
uint32_t GlobalBase;
uint32_t InitialMemory;
uint32_t MaxMemory;
uint32_t ZStackSize;
unsigned LTOPartitions;
unsigned LTOO;
unsigned Optimize;
unsigned ThinLTOJobs;
llvm::StringRef Entry;
llvm::StringRef OutputFile;
llvm::StringRef ThinLTOCacheDir;
llvm::StringSet<> AllowUndefinedSymbols;
std::vector<llvm::StringRef> SearchPaths;
llvm::CachePruningPolicy ThinLTOCachePolicy;
};
// The only instance of Configuration struct.
extern Configuration *Config;
} // namespace wasm
} // namespace lld
#endif