mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Move linker arguments to the end
This commit is contained in:
@@ -210,9 +210,6 @@ toolchains::GenericUnix::constructInvocation(const LinkJobAction &job,
|
||||
SmallString<128> StaticRuntimeLibPath;
|
||||
getRuntimeLibraryPath(StaticRuntimeLibPath, context.Args, /*Shared=*/false);
|
||||
|
||||
context.Args.AddAllArgs(Arguments, options::OPT_Xlinker);
|
||||
context.Args.AddAllArgs(Arguments, options::OPT_linker_option_Group);
|
||||
|
||||
// Add the runtime library link path, which is platform-specific and found
|
||||
// relative to the compiler.
|
||||
if (!(staticExecutable || staticStdlib) && shouldProvideRPathToLinker()) {
|
||||
@@ -325,6 +322,10 @@ toolchains::GenericUnix::constructInvocation(const LinkJobAction &job,
|
||||
Arguments.push_back("-v");
|
||||
}
|
||||
|
||||
// These custom arguments should be right before the object file at the end
|
||||
context.Args.AddAllArgs(Arguments, options::OPT_Xlinker);
|
||||
context.Args.AddAllArgs(Arguments, options::OPT_linker_option_Group);
|
||||
|
||||
// This should be the last option, for convenience in checking output.
|
||||
Arguments.push_back("-o");
|
||||
Arguments.push_back(
|
||||
|
||||
Reference in New Issue
Block a user