//===- Config.h -------------------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef LLD_WASM_CONFIG_H #define LLD_WASM_CONFIG_H #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSet.h" #include "llvm/BinaryFormat/Wasm.h" #include "llvm/Support/CachePruning.h" #include <optional> namespace llvm { enum class CodeGenOptLevel; } // namespace llvm namespace lld::wasm { class InputFile; class StubFile; class ObjFile; class SharedFile; class BitcodeFile; class InputTable; class InputGlobal; class InputFunction; class Symbol; // For --unresolved-symbols. enum class UnresolvedPolicy { … }; // For --build-id. enum class BuildIdKind { … }; // This struct contains the global configuration for the linker. // Most fields are direct mapping from the command line options // and such fields have the same name as the corresponding options. // Most fields are initialized by the driver. struct Configuration { … }; // The only instance of Configuration struct. extern Configuration *config; // The Ctx object hold all other (non-configuration) global state. struct Ctx { … }; extern Ctx ctx; } // namespace lld::wasm #endif