@@ -43,15 +43,48 @@ class LLVM_LIBRARY_VISIBILITY GenericUnix : public ToolChain {
43
43
InvocationInfo constructInvocation (const AutolinkExtractJobAction &job,
44
44
const JobContext &context) const override ;
45
45
46
+ // / If provided, and if the user has not already explicitly specified a
47
+ // / linker to use via the "-fuse-ld=" option, this linker will be passed to
48
+ // / the compiler invocation via "-fuse-ld=". Return an empty string to not
49
+ // / specify any specific linker (the "-fuse-ld=" option will not be
50
+ // / specified).
51
+ // /
52
+ // / The default behavior is to use the gold linker on ARM architectures,
53
+ // / and to not provide a specific linker otherwise.
46
54
virtual std::string getDefaultLinker () const ;
47
55
56
+ // / Whether to specify a linker -rpath to the Swift runtime library path.
57
+ // / -rpath is not supported on all platforms, and subclasses may override
58
+ // / this method to return false on platforms that don't support it. The
59
+ // / default is to return true (and so specify an -rpath).
48
60
virtual bool shouldProvideRPathToLinker () const ;
49
61
62
+ // / Whether to explicitly specify the target triple as the the linker
63
+ // / '--target'. This is not desirable on all platforms, and subclasses may
64
+ // / override this method to return false in those cases.
50
65
virtual bool shouldSpecifyTargetTripleToLinker () const ;
51
66
67
+ // / Provides a path to an object that should be linked first. On platforms
68
+ // / that use ELF binaries, an object that provides markers and sizes for
69
+ // / metadata sections must be linked first. Platforms that do not need this
70
+ // / object may return an empty string; no additional objects are linked in
71
+ // / this case.
72
+ // /
73
+ // / \param RuntimeLibraryPath A path to the Swift resource directory, which
74
+ // / on ARM architectures will contain metadata "begin" and "end"
75
+ // / objects.
52
76
virtual std::string
53
77
getPreInputObjectPath (StringRef RuntimeLibraryPath) const ;
54
78
79
+ // / Provides a path to an object that should be linked last. On platforms
80
+ // / that use ELF binaries, an object that provides markers and sizes for
81
+ // / metadata sections must be linked last. Platforms that do not need this
82
+ // / object may return an empty string; no additional objects are linked in
83
+ // / this case.
84
+ // /
85
+ // / \param RuntimeLibraryPath A path to the Swift resource directory, which
86
+ // / on ARM architectures will contain metadata "begin" and "end"
87
+ // / objects.
55
88
virtual std::string
56
89
getPostInputObjectPath (StringRef RuntimeLibraryPath) const ;
57
90
0 commit comments