In a very recent change I introduced a --no-export-default flag but after conferring with others it seems that this feature already exists in gnu GNU ld and lld in the form the --export-dynamic flag which is off by default. This change replaces export-default with export-dynamic and also changes the default to match the traditional linker behaviour. Now, by default, only the entry point is exported. If other symbols are required by the embedder then --export-dynamic or --export can be used to export all visibility hidden symbols or individual symbols respectively. This change touches a lot of tests that were relying on symbols being exported by default. I imagine it will also effect many users but do think the change is worth it match of the traditional behaviour and flag names. Differential Revision: https://reviews.llvm.org/D52587 llvm-svn: 343265
63 lines
1.4 KiB
C++
63 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 CompressRelocations;
|
|
bool Demangle;
|
|
bool DisableVerify;
|
|
bool ExportAll;
|
|
bool ExportDynamic;
|
|
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
|