Links input files using the Microsoft Visual C++ toolchain. The task provides access to the MSVC linker (link.exe). It can be used to link appropriate input files into a final binary. Generally it is used to link the output object files from the saker.msvc.ccompile() task, however, other type of files which are valid inputs to the backend linker are accepted as well. The task supports distributing its workload using build clusters.
|Architecture||Specifies the linking target Architecture.|
|Identifier||The Identifier of the link operation.|
Required parameter.Specifies one or more inputs for the link operation.
|LibraryPath||Specifies the library path that will be searched for libraries.|
|LinkerOptions||Specifies one or more option specifications that are merged with the inputs when applicable.|
|SDKs||Specifies the SDKs (Software Development Kits) used by the task.|
|SimpleParameters||Specifies one or more singular arguments that should be directly passed to the linker backend (link.exe).|
Specifies the linking target Architecture. The link operation will target the specified architecture. If no architecture is specified, the task will attempt to infer it from the input objects. It will check if any of the input is an output of the saker.msvc.ccompile() task, and if so the target architecture will be set to the architecture that was used during compilation. If the target architecture is incompatible with the input files, then the linker backed (link.exe) will most likely emit an error or warning to signal that. The used Architecture will be taken into account as a qualifier when merging LinkerOptions.
The Identifier of the link operation. Each link task has an identifier that uniquely identifies it during a build execution. The identifier is used to determine the output directory of the link operation. It is also used to merge the appropriate options specified in LinkerOptions parameter. An identifier constists of dash separated parts of character sequences of a-z, A-Z, 0-9, _, ., (), , @. An option specification in the LinkerOptions can be merged if the linker identifier contains all parts of the option Identifier. If not specified, the identifier is determined based on the current working directory, or assigned to "default", however, it won't be subject to option merging.
Required parameter.Specifies one or more inputs for the link operation. The inputs may be either simple paths, wildcards, file locations, file collections or task output from saker.msvc.ccompile().
Specifies the library path that will be searched for libraries. The values may be simple paths, wildcards, file locations, file collections, or SDK paths. The link task doesn't specify any library paths by default. Corresponds to the /LIBPATH command line option for link.exe.
Specifies one or more option specifications that are merged with the inputs when applicable. The parameter can be used to indirectly specify various linker arguments independent of the actual inputs. This is generally useful when common options need to be specified to multiple link operation inputs. When linker arguments are determined, each option specification will be merged into the used argumnets if applicable. An option is considered to be applicable to merging if all of the Identifier parts are contained in the link task Identifier, and the Architecture arguments can be matched. In case of unresolveable merge conflicts, the task will throw an appropriate exception. Output from the saker.msvc.coptions.preset() task can be passed as a value to this parameter.
Specifies the SDKs (Software Development Kits) used by the task. SDKs represent development kits that are available in the build environment and to the task. SDKs are used to determine the appropriate build environment to execute the task, as well to resolve paths against them (e.g. IncludeDirectory, LibraryPath). The "MSVC" SDK is used to determine the location of the backend executables (cl.exe, link.exe). If it is not specified, then the task will attempt to determine it automatically. Any SDKs that were used in any of the compilation task inputs will be added to the set of used SDKs.
Specifies one or more singular arguments that should be directly passed to the linker backend (link.exe). Any arguments specified will be appended to the link.exe invocation for the inputs. Take care when using this option as specifying files here may result in incorrect incremental builds. The parameters should be singular, meaning that arguments that require multiple command line options shouldn't be specified here. The order of the specified arguments are irrelevant, and may be changed by the task.