150
|
1 //===- MinGW.h --------------------------------------------------*- C++ -*-===//
|
|
2 //
|
|
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
4 // See https://llvm.org/LICENSE.txt for license information.
|
|
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
6 //
|
|
7 //===----------------------------------------------------------------------===//
|
|
8
|
|
9 #ifndef LLD_COFF_MINGW_H
|
|
10 #define LLD_COFF_MINGW_H
|
|
11
|
|
12 #include "Config.h"
|
|
13 #include "Symbols.h"
|
|
14 #include "lld/Common/LLVM.h"
|
|
15 #include "llvm/ADT/StringSet.h"
|
|
16
|
|
17 namespace lld {
|
|
18 namespace coff {
|
|
19
|
|
20 // Logic for deciding what symbols to export, when exporting all
|
|
21 // symbols for MinGW.
|
|
22 class AutoExporter {
|
|
23 public:
|
|
24 AutoExporter();
|
|
25
|
|
26 void addWholeArchive(StringRef path);
|
|
27
|
|
28 llvm::StringSet<> excludeSymbols;
|
|
29 llvm::StringSet<> excludeSymbolPrefixes;
|
|
30 llvm::StringSet<> excludeSymbolSuffixes;
|
|
31 llvm::StringSet<> excludeLibs;
|
|
32 llvm::StringSet<> excludeObjects;
|
|
33
|
|
34 bool shouldExport(Defined *sym) const;
|
|
35 };
|
|
36
|
|
37 void writeDefFile(StringRef name);
|
|
38
|
|
39 } // namespace coff
|
|
40 } // namespace lld
|
|
41
|
|
42 #endif
|