2020-04-02 11:54:05 -07:00
|
|
|
//===- 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_MACHO_CONFIG_H
|
|
|
|
#define LLD_MACHO_CONFIG_H
|
|
|
|
|
2021-03-03 12:15:09 -08:00
|
|
|
#include "llvm/ADT/CachedHashString.h"
|
2020-05-05 16:37:34 -07:00
|
|
|
#include "llvm/ADT/DenseMap.h"
|
2021-03-03 12:15:09 -08:00
|
|
|
#include "llvm/ADT/DenseSet.h"
|
2024-06-28 16:47:59 -07:00
|
|
|
#include "llvm/ADT/SetVector.h"
|
2022-07-30 18:11:21 -07:00
|
|
|
#include "llvm/ADT/SmallVector.h"
|
2020-04-02 11:54:05 -07:00
|
|
|
#include "llvm/ADT/StringRef.h"
|
2021-07-22 11:20:36 -04:00
|
|
|
#include "llvm/ADT/StringSet.h"
|
2020-04-28 16:58:22 -07:00
|
|
|
#include "llvm/BinaryFormat/MachO.h"
|
2021-07-15 12:56:13 -04:00
|
|
|
#include "llvm/Support/CachePruning.h"
|
2021-03-03 12:15:09 -08:00
|
|
|
#include "llvm/Support/GlobPattern.h"
|
2020-08-10 18:47:16 -07:00
|
|
|
#include "llvm/Support/VersionTuple.h"
|
2021-04-05 09:59:50 -07:00
|
|
|
#include "llvm/TextAPI/Architecture.h"
|
|
|
|
#include "llvm/TextAPI/Platform.h"
|
|
|
|
#include "llvm/TextAPI/Target.h"
|
2020-04-02 11:54:05 -07:00
|
|
|
|
2020-04-21 13:37:57 -07:00
|
|
|
#include <vector>
|
|
|
|
|
2023-09-14 14:10:14 -07:00
|
|
|
namespace llvm {
|
|
|
|
enum class CodeGenOptLevel;
|
|
|
|
} // namespace llvm
|
2023-02-15 17:12:47 +00:00
|
|
|
|
2020-04-02 11:54:05 -07:00
|
|
|
namespace lld {
|
|
|
|
namespace macho {
|
|
|
|
|
2022-01-12 10:47:04 -05:00
|
|
|
class InputSection;
|
2020-04-02 11:54:05 -07:00
|
|
|
class Symbol;
|
|
|
|
|
2021-02-26 15:36:49 -08:00
|
|
|
using NamePair = std::pair<llvm::StringRef, llvm::StringRef>;
|
|
|
|
using SectionRenameMap = llvm::DenseMap<NamePair, NamePair>;
|
|
|
|
using SegmentRenameMap = llvm::DenseMap<llvm::StringRef, llvm::StringRef>;
|
|
|
|
|
2020-08-10 18:47:16 -07:00
|
|
|
struct PlatformInfo {
|
2021-04-21 05:41:14 -07:00
|
|
|
llvm::MachO::Target target;
|
2020-08-10 18:47:16 -07:00
|
|
|
llvm::VersionTuple sdk;
|
|
|
|
};
|
|
|
|
|
2021-06-04 23:31:40 -07:00
|
|
|
inline uint32_t encodeVersion(const llvm::VersionTuple &version) {
|
|
|
|
return ((version.getMajor() << 020) |
|
2022-06-19 00:29:41 -07:00
|
|
|
(version.getMinor().value_or(0) << 010) |
|
|
|
|
version.getSubminor().value_or(0));
|
2021-06-04 23:31:40 -07:00
|
|
|
}
|
|
|
|
|
2021-02-18 08:48:07 -05:00
|
|
|
enum class NamespaceKind {
|
|
|
|
twolevel,
|
|
|
|
flat,
|
|
|
|
};
|
|
|
|
|
2020-12-13 19:31:33 -08:00
|
|
|
enum class UndefinedSymbolTreatment {
|
|
|
|
unknown,
|
|
|
|
error,
|
|
|
|
warning,
|
|
|
|
suppress,
|
|
|
|
dynamic_lookup,
|
|
|
|
};
|
|
|
|
|
2021-05-19 09:58:17 -07:00
|
|
|
enum class ICFLevel {
|
|
|
|
unknown,
|
|
|
|
none,
|
|
|
|
safe,
|
2024-09-05 16:36:21 -07:00
|
|
|
safe_thunks,
|
2021-05-19 09:58:17 -07:00
|
|
|
all,
|
|
|
|
};
|
|
|
|
|
[lld-macho] Add support for objc_msgSend stubs
Apple Clang in Xcode 14 introduced a new feature for reducing the
overhead of objc_msgSend calls by deduplicating the setup calls for each
individual selector. This works by clang adding undefined symbols for
each selector called in a translation unit, such as `_objc_msgSend$foo`
for calling the `foo` method on any `NSObject`. There are 2
different modes for this behavior, the default directly does the setup
for `_objc_msgSend` and calls it, and the smaller option does the
selector setup, and then calls the standard `_objc_msgSend` stub
function.
The general overview of how this works is:
- Undefined symbols with the given prefix are collected
- The suffix of each matching undefined symbol is added as a string to
`__objc_methname`
- A pointer is added for every method name in the `__objc_selrefs`
section
- A `got` entry is emitted for `_objc_msgSend`
- Stubs are emitting pointing to the synthesized locations
Notes:
- Both `__objc_methname` and `__objc_selrefs` can also exist from object
files, so their contents are merged with our synthesized contents
- The compiler emits method names for defined methods, but not for
undefined symbols you call, but stubs are used for both
- This only implements the default "fast" mode currently just to reduce
the diff, I also doubt many folks will care to swap modes
- This only implements this for arm64 and x86_64, we don't need to
implement this for 32 bit iOS archs, but we should implement it for
watchOS archs in a later diff
Differential Revision: https://reviews.llvm.org/D128108
2022-06-16 21:35:18 -07:00
|
|
|
enum class ObjCStubsMode {
|
|
|
|
fast,
|
|
|
|
small,
|
|
|
|
};
|
|
|
|
|
2021-05-11 11:43:48 -04:00
|
|
|
struct SectionAlign {
|
|
|
|
llvm::StringRef segName;
|
|
|
|
llvm::StringRef sectName;
|
|
|
|
uint32_t align;
|
|
|
|
};
|
|
|
|
|
2021-03-29 14:08:12 -04:00
|
|
|
struct SegmentProtection {
|
|
|
|
llvm::StringRef name;
|
|
|
|
uint32_t maxProt;
|
|
|
|
uint32_t initProt;
|
|
|
|
};
|
|
|
|
|
2021-03-03 12:15:09 -08:00
|
|
|
class SymbolPatterns {
|
2021-03-10 16:45:18 -08:00
|
|
|
public:
|
2021-03-03 12:15:09 -08:00
|
|
|
// GlobPattern can also match literals,
|
|
|
|
// but we prefer the O(1) lookup of DenseSet.
|
2024-06-28 16:47:59 -07:00
|
|
|
llvm::SetVector<llvm::CachedHashStringRef> literals;
|
2021-03-03 12:15:09 -08:00
|
|
|
std::vector<llvm::GlobPattern> globs;
|
|
|
|
|
|
|
|
bool empty() const { return literals.empty() && globs.empty(); }
|
|
|
|
void clear();
|
|
|
|
void insert(llvm::StringRef symbolName);
|
|
|
|
bool matchLiteral(llvm::StringRef symbolName) const;
|
|
|
|
bool matchGlob(llvm::StringRef symbolName) const;
|
|
|
|
bool match(llvm::StringRef symbolName) const;
|
|
|
|
};
|
|
|
|
|
2022-05-20 14:45:26 +07:00
|
|
|
enum class SymtabPresence {
|
|
|
|
All,
|
|
|
|
None,
|
|
|
|
SelectivelyIncluded,
|
|
|
|
SelectivelyExcluded,
|
|
|
|
};
|
|
|
|
|
2020-04-02 11:54:05 -07:00
|
|
|
struct Configuration {
|
2021-05-09 20:05:45 -04:00
|
|
|
Symbol *entry = nullptr;
|
2020-04-23 20:16:49 -07:00
|
|
|
bool hasReexports = false;
|
2020-08-25 20:00:42 -07:00
|
|
|
bool allLoad = false;
|
2021-07-12 10:26:54 -04:00
|
|
|
bool applicationExtension = false;
|
2021-07-05 20:52:09 -04:00
|
|
|
bool archMultiple = false;
|
2021-07-06 00:25:01 -04:00
|
|
|
bool exportDynamic = false;
|
2020-08-18 14:37:04 -07:00
|
|
|
bool forceLoadObjC = false;
|
2022-07-19 21:54:58 -04:00
|
|
|
bool forceLoadSwift = false; // Only applies to LC_LINKER_OPTIONs.
|
2020-09-21 13:21:45 -07:00
|
|
|
bool staticLink = false;
|
2020-12-09 15:08:05 -08:00
|
|
|
bool implicitDylibs = false;
|
2020-09-05 10:55:33 -07:00
|
|
|
bool isPic = false;
|
2020-09-21 11:04:13 -07:00
|
|
|
bool headerPadMaxInstallNames = false;
|
2021-03-09 10:17:01 -05:00
|
|
|
bool markDeadStrippableDylib = false;
|
2021-06-09 15:16:45 -04:00
|
|
|
bool printDylibSearch = false;
|
2020-12-02 18:57:30 -05:00
|
|
|
bool printEachFile = false;
|
2020-12-02 18:59:00 -05:00
|
|
|
bool printWhyLoad = false;
|
2020-09-20 08:37:20 -07:00
|
|
|
bool searchDylibsFirst = false;
|
2020-10-26 19:18:29 -07:00
|
|
|
bool saveTemps = false;
|
2021-03-05 09:07:58 -05:00
|
|
|
bool adhocCodesign = false;
|
2021-03-22 17:38:52 -04:00
|
|
|
bool emitFunctionStarts = false;
|
2021-06-15 21:38:29 -04:00
|
|
|
bool emitDataInCodeInfo = false;
|
2021-04-21 13:35:12 -04:00
|
|
|
bool emitEncryptionInfo = false;
|
2022-08-30 16:54:04 +02:00
|
|
|
bool emitInitOffsets = false;
|
2022-08-15 09:26:28 +02:00
|
|
|
bool emitChainedFixups = false;
|
2024-03-27 14:34:27 -07:00
|
|
|
bool emitRelativeMethodLists = false;
|
2022-11-20 11:59:16 -05:00
|
|
|
bool thinLTOEmitImportsFiles;
|
|
|
|
bool thinLTOEmitIndexFiles;
|
|
|
|
bool thinLTOIndexOnly;
|
2021-03-11 15:04:27 +01:00
|
|
|
bool timeTraceEnabled = false;
|
2021-04-25 16:00:24 -07:00
|
|
|
bool dataConst = false;
|
2022-12-21 15:48:28 -08:00
|
|
|
bool dedupStrings = true;
|
2025-01-23 15:48:11 -08:00
|
|
|
bool dedupSymbolStrings = true;
|
2022-09-27 23:42:47 -07:00
|
|
|
bool deadStripDuplicates = false;
|
2021-10-26 21:42:25 -07:00
|
|
|
bool omitDebugInfo = false;
|
2021-11-09 18:10:28 -08:00
|
|
|
bool warnDylibInstallName = false;
|
2022-06-17 17:21:59 +02:00
|
|
|
bool ignoreOptimizationHints = false;
|
2022-07-27 23:31:21 -07:00
|
|
|
bool forceExactCpuSubtypeMatch = false;
|
2020-07-30 14:28:45 -07:00
|
|
|
uint32_t headerPad;
|
2020-12-14 18:24:50 -05:00
|
|
|
uint32_t dylibCompatibilityVersion = 0;
|
|
|
|
uint32_t dylibCurrentVersion = 0;
|
2021-03-24 21:05:26 -04:00
|
|
|
uint32_t timeTraceGranularity = 500;
|
2021-07-15 18:29:05 -07:00
|
|
|
unsigned optimize;
|
2021-03-11 15:04:27 +01:00
|
|
|
std::string progName;
|
2021-07-05 19:46:09 -04:00
|
|
|
|
|
|
|
// For `clang -arch arm64 -arch x86_64`, clang will:
|
|
|
|
// 1. invoke the linker twice, to write one temporary output per arch
|
|
|
|
// 2. invoke `lipo` to merge the two outputs into a single file
|
|
|
|
// `outputFile` is the name of the temporary file the linker writes to.
|
|
|
|
// `finalOutput `is the name of the file lipo writes to after the link.
|
|
|
|
llvm::StringRef outputFile;
|
|
|
|
llvm::StringRef finalOutput;
|
|
|
|
|
2020-04-28 16:58:22 -07:00
|
|
|
llvm::StringRef installName;
|
2024-11-21 09:02:17 +08:00
|
|
|
llvm::StringRef clientName;
|
2021-03-18 10:38:30 -04:00
|
|
|
llvm::StringRef mapFile;
|
2024-11-22 18:01:59 -05:00
|
|
|
llvm::StringRef ltoNewPmPasses;
|
2020-12-02 20:34:17 -08:00
|
|
|
llvm::StringRef ltoObjPath;
|
2021-04-08 12:14:47 -04:00
|
|
|
llvm::StringRef thinLTOJobs;
|
2021-07-05 14:40:52 -04:00
|
|
|
llvm::StringRef umbrella;
|
2021-07-01 15:01:59 -04:00
|
|
|
uint32_t ltoo = 2;
|
2023-09-14 14:10:14 -07:00
|
|
|
llvm::CodeGenOptLevel ltoCgo;
|
2021-07-15 12:56:13 -04:00
|
|
|
llvm::CachePruningPolicy thinLTOCachePolicy;
|
|
|
|
llvm::StringRef thinLTOCacheDir;
|
2022-11-20 11:59:16 -05:00
|
|
|
llvm::StringRef thinLTOIndexOnlyArg;
|
|
|
|
std::pair<llvm::StringRef, llvm::StringRef> thinLTOObjectSuffixReplace;
|
2023-04-04 09:57:53 -07:00
|
|
|
llvm::StringRef thinLTOPrefixReplaceOld;
|
|
|
|
llvm::StringRef thinLTOPrefixReplaceNew;
|
|
|
|
llvm::StringRef thinLTOPrefixReplaceNativeObject;
|
2021-05-31 22:12:35 -04:00
|
|
|
bool deadStripDylibs = false;
|
clang+lld: Improve clang+ld.darwinnew.lld interaction, pass -demangle
This patch:
- adds an ld64.lld.darwinnew symlink for lld, to go with f2710d4b576,
so that `clang -fuse-ld=lld.darwinnew` can be used to test new
Mach-O lld while it's in bring-up. (The expectation is that we'll
remove this again once new Mach-O lld is the defauld and only Mach-O
lld.)
- lets the clang driver know if the linker is lld (currently
only triggered if `-fuse-ld=lld` or `-fuse-ld=lld.darwinnew` is
passed). Currently only used for the next point, but could be used
to implement other features that need close coordination between
compiler and linker, e.g. having a diag for calling `clang++` instead
of `clang` when link errors are caused by a missing C++ stdlib.
- lets the clang driver pass `-demangle` to Mach-O lld (both old and
new), in addition to ld64
- implements -demangle for new Mach-O lld
- changes demangleItanium() to accept _Z, __Z, ___Z, ____Z prefixes
(and updates one test added in D68014). Mach-O has an extra
underscore for symbols, and the three (or, on Mach-O, four)
underscores are used for block names.
Differential Revision: https://reviews.llvm.org/D91884
2020-11-20 13:57:44 -05:00
|
|
|
bool demangle = false;
|
[lld/mac] Implement -dead_strip
Also adds support for live_support sections, no_dead_strip sections,
.no_dead_strip symbols.
Chromium Framework 345MB unstripped -> 250MB stripped
(vs 290MB unstripped -> 236M stripped with ld64).
Doing dead stripping is a bit faster than not, because so much less
data needs to be processed:
% ministat lld_*
x lld_nostrip.txt
+ lld_strip.txt
N Min Max Median Avg Stddev
x 10 3.929414 4.07692 4.0269079 4.0089678 0.044214794
+ 10 3.8129408 3.9025559 3.8670411 3.8642573 0.024779651
Difference at 95.0% confidence
-0.144711 +/- 0.0336749
-3.60967% +/- 0.839989%
(Student's t, pooled s = 0.0358398)
This interacts with many parts of the linker. I tried to add test coverage
for all added `isLive()` checks, so that some test will fail if any of them
is removed. I checked that the test expectations for the most part match
ld64's behavior (except for live-support-iterations.s, see the comment
in the test). Interacts with:
- debug info
- export tries
- import opcodes
- flags like -exported_symbol(s_list)
- -U / dynamic_lookup
- mod_init_funcs, mod_term_funcs
- weak symbol handling
- unwind info
- stubs
- map files
- -sectcreate
- undefined, dylib, common, defined (both absolute and normal) symbols
It's possible it interacts with more features I didn't think of,
of course.
I also did some manual testing:
- check-llvm check-clang check-lld work with lld with this patch
as host linker and -dead_strip enabled
- Chromium still starts
- Chromium's base_unittests still pass, including unwind tests
Implemenation-wise, this is InputSection-based, so it'll work for
object files with .subsections_via_symbols (which includes all
object files generated by clang). I first based this on the COFF
implementation, but later realized that things are more similar to ELF.
I think it'd be good to refactor MarkLive.cpp to look more like the ELF
part at some point, but I'd like to get a working state checked in first.
Mechanical parts:
- Rename canOmitFromOutput to wasCoalesced (no behavior change)
since it really is for weak coalesced symbols
- Add noDeadStrip to Defined, corresponding to N_NO_DEAD_STRIP
(`.no_dead_strip` in asm)
Fixes PR49276.
Differential Revision: https://reviews.llvm.org/D103324
2021-05-07 17:10:05 -04:00
|
|
|
bool deadStrip = false;
|
2025-03-28 20:05:50 +01:00
|
|
|
bool interposable = false;
|
2021-11-03 21:23:04 -07:00
|
|
|
bool errorForArchMismatch = false;
|
2022-10-08 20:38:00 -07:00
|
|
|
bool ignoreAutoLink = false;
|
2022-10-08 21:28:02 -07:00
|
|
|
// ld64 allows invalid auto link options as long as the link succeeds. LLD
|
|
|
|
// does not, but there are cases in the wild where the invalid linker options
|
|
|
|
// exist. This allows users to ignore the specific invalid options in the case
|
|
|
|
// they can't easily fix them.
|
|
|
|
llvm::StringSet<> ignoreAutoLinkOptions;
|
2022-12-22 13:39:53 -08:00
|
|
|
bool strictAutoLink = false;
|
2021-03-04 14:36:47 -05:00
|
|
|
PlatformInfo platformInfo;
|
2022-11-27 16:54:07 -08:00
|
|
|
std::optional<PlatformInfo> secondaryPlatformInfo;
|
2021-02-18 08:48:07 -05:00
|
|
|
NamespaceKind namespaceKind = NamespaceKind::twolevel;
|
2020-12-13 19:31:33 -08:00
|
|
|
UndefinedSymbolTreatment undefinedSymbolTreatment =
|
|
|
|
UndefinedSymbolTreatment::error;
|
2021-05-19 09:58:17 -07:00
|
|
|
ICFLevel icfLevel = ICFLevel::none;
|
2024-05-27 19:07:39 -07:00
|
|
|
bool keepICFStabs = false;
|
[lld-macho] Add support for objc_msgSend stubs
Apple Clang in Xcode 14 introduced a new feature for reducing the
overhead of objc_msgSend calls by deduplicating the setup calls for each
individual selector. This works by clang adding undefined symbols for
each selector called in a translation unit, such as `_objc_msgSend$foo`
for calling the `foo` method on any `NSObject`. There are 2
different modes for this behavior, the default directly does the setup
for `_objc_msgSend` and calls it, and the smaller option does the
selector setup, and then calls the standard `_objc_msgSend` stub
function.
The general overview of how this works is:
- Undefined symbols with the given prefix are collected
- The suffix of each matching undefined symbol is added as a string to
`__objc_methname`
- A pointer is added for every method name in the `__objc_selrefs`
section
- A `got` entry is emitted for `_objc_msgSend`
- Stubs are emitting pointing to the synthesized locations
Notes:
- Both `__objc_methname` and `__objc_selrefs` can also exist from object
files, so their contents are merged with our synthesized contents
- The compiler emits method names for defined methods, but not for
undefined symbols you call, but stubs are used for both
- This only implements the default "fast" mode currently just to reduce
the diff, I also doubt many folks will care to swap modes
- This only implements this for arm64 and x86_64, we don't need to
implement this for 32 bit iOS archs, but we should implement it for
watchOS archs in a later diff
Differential Revision: https://reviews.llvm.org/D128108
2022-06-16 21:35:18 -07:00
|
|
|
ObjCStubsMode objcStubsMode = ObjCStubsMode::fast;
|
2020-04-23 20:16:49 -07:00
|
|
|
llvm::MachO::HeaderFileType outputType;
|
2020-08-13 13:48:47 -07:00
|
|
|
std::vector<llvm::StringRef> systemLibraryRoots;
|
2020-06-17 19:59:27 -07:00
|
|
|
std::vector<llvm::StringRef> librarySearchPaths;
|
|
|
|
std::vector<llvm::StringRef> frameworkSearchPaths;
|
2024-07-18 10:49:19 +02:00
|
|
|
bool warnDuplicateRpath = true;
|
2022-07-30 18:11:21 -07:00
|
|
|
llvm::SmallVector<llvm::StringRef, 0> runtimePaths;
|
2024-11-28 00:23:49 +08:00
|
|
|
llvm::SmallVector<llvm::StringRef, 0> allowableClients;
|
2021-04-08 14:12:20 -04:00
|
|
|
std::vector<std::string> astPaths;
|
2021-02-09 08:18:23 -05:00
|
|
|
std::vector<Symbol *> explicitUndefineds;
|
2021-07-22 11:20:36 -04:00
|
|
|
llvm::StringSet<> explicitDynamicLookups;
|
2021-05-11 11:43:48 -04:00
|
|
|
// There are typically few custom sectionAlignments or segmentProtections,
|
|
|
|
// so use a vector instead of a map.
|
|
|
|
std::vector<SectionAlign> sectionAlignments;
|
2021-03-29 14:08:12 -04:00
|
|
|
std::vector<SegmentProtection> segmentProtections;
|
2023-05-31 14:02:23 -07:00
|
|
|
bool ltoDebugPassManager = false;
|
2024-09-15 06:39:06 -07:00
|
|
|
llvm::StringRef codegenDataGeneratePath;
|
2023-05-31 14:17:35 -07:00
|
|
|
bool csProfileGenerate = false;
|
|
|
|
llvm::StringRef csProfilePath;
|
2023-09-11 09:13:55 -07:00
|
|
|
bool pgoWarnMismatch;
|
2024-07-18 16:26:32 +02:00
|
|
|
bool warnThinArchiveMissingMembers;
|
2025-03-19 16:05:01 -07:00
|
|
|
bool disableVerify;
|
2021-03-03 12:15:09 -08:00
|
|
|
|
2022-01-12 10:47:04 -05:00
|
|
|
bool callGraphProfileSort = false;
|
|
|
|
llvm::StringRef printSymbolOrder;
|
|
|
|
|
2024-12-10 14:50:21 +08:00
|
|
|
llvm::StringRef irpgoProfilePath;
|
|
|
|
bool bpStartupFunctionSort = false;
|
|
|
|
bool bpCompressionSortStartupFunctions = false;
|
|
|
|
bool bpFunctionOrderForCompression = false;
|
|
|
|
bool bpDataOrderForCompression = false;
|
|
|
|
bool bpVerboseSectionOrderer = false;
|
2024-07-23 08:34:40 -07:00
|
|
|
|
2021-02-26 15:36:49 -08:00
|
|
|
SectionRenameMap sectionRenameMap;
|
|
|
|
SegmentRenameMap segmentRenameMap;
|
2021-03-03 12:15:09 -08:00
|
|
|
|
2022-06-10 23:34:54 -07:00
|
|
|
bool hasExplicitExports = false;
|
2021-03-03 12:15:09 -08:00
|
|
|
SymbolPatterns exportedSymbols;
|
|
|
|
SymbolPatterns unexportedSymbols;
|
2022-02-24 15:39:59 -05:00
|
|
|
SymbolPatterns whyLive;
|
2021-04-21 15:43:38 -04:00
|
|
|
|
2022-07-16 11:26:44 -07:00
|
|
|
std::vector<std::pair<llvm::StringRef, llvm::StringRef>> aliasedSymbols;
|
|
|
|
|
2022-05-20 14:45:26 +07:00
|
|
|
SymtabPresence localSymbolsPresence = SymtabPresence::All;
|
|
|
|
SymbolPatterns localSymbolPatterns;
|
2022-11-14 14:23:56 -05:00
|
|
|
llvm::SmallVector<llvm::StringRef, 0> mllvmOpts;
|
2024-11-22 18:01:59 -05:00
|
|
|
llvm::SmallVector<llvm::StringRef, 0> passPlugins;
|
2022-05-20 14:45:26 +07:00
|
|
|
|
2022-10-08 21:04:56 -07:00
|
|
|
bool zeroModTime = true;
|
2023-07-19 11:07:57 -07:00
|
|
|
bool generateUuid = true;
|
2021-06-01 06:55:36 -04:00
|
|
|
|
2021-10-21 22:38:12 -04:00
|
|
|
llvm::StringRef osoPrefix;
|
|
|
|
|
2022-09-16 13:38:20 -04:00
|
|
|
std::vector<llvm::StringRef> dyldEnvs;
|
|
|
|
|
2021-04-21 15:43:38 -04:00
|
|
|
llvm::MachO::Architecture arch() const { return platformInfo.target.Arch; }
|
|
|
|
|
2022-01-12 14:01:59 -08:00
|
|
|
llvm::MachO::PlatformType platform() const {
|
2021-04-21 15:43:38 -04:00
|
|
|
return platformInfo.target.Platform;
|
|
|
|
}
|
2020-05-05 16:37:34 -07:00
|
|
|
};
|
|
|
|
|
2022-01-10 19:39:14 -08:00
|
|
|
extern std::unique_ptr<Configuration> config;
|
2020-04-02 11:54:05 -07:00
|
|
|
|
|
|
|
} // namespace macho
|
|
|
|
} // namespace lld
|
|
|
|
|
|
|
|
#endif
|