2017-10-20 03:49:38 +08:00
|
|
|
//===- MinGW.h --------------------------------------------------*- C++ -*-===//
|
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// 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
|
2017-10-20 03:49:38 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLD_COFF_MINGW_H
|
|
|
|
#define LLD_COFF_MINGW_H
|
|
|
|
|
|
|
|
#include "Config.h"
|
|
|
|
#include "Symbols.h"
|
|
|
|
#include "lld/Common/LLVM.h"
|
|
|
|
|
|
|
|
namespace lld {
|
|
|
|
namespace coff {
|
|
|
|
|
|
|
|
// Logic for deciding what symbols to export, when exporting all
|
|
|
|
// symbols for MinGW.
|
|
|
|
class AutoExporter {
|
|
|
|
public:
|
|
|
|
AutoExporter();
|
|
|
|
|
2018-09-05 04:56:56 +08:00
|
|
|
void addWholeArchive(StringRef Path);
|
|
|
|
|
2017-10-20 04:19:16 +08:00
|
|
|
llvm::StringSet<> ExcludeSymbols;
|
2018-09-26 14:13:47 +08:00
|
|
|
llvm::StringSet<> ExcludeSymbolPrefixes;
|
|
|
|
llvm::StringSet<> ExcludeSymbolSuffixes;
|
2017-10-20 04:19:16 +08:00
|
|
|
llvm::StringSet<> ExcludeLibs;
|
|
|
|
llvm::StringSet<> ExcludeObjects;
|
2017-10-20 03:49:38 +08:00
|
|
|
|
|
|
|
bool shouldExport(Defined *Sym) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
void writeDefFile(StringRef Name);
|
|
|
|
|
|
|
|
} // namespace coff
|
|
|
|
} // namespace lld
|
|
|
|
|
|
|
|
#endif
|