clang 17.0.0git
AIX.cpp
Go to the documentation of this file.
1//===--- AIX.cpp - AIX ToolChain Implementations ----------------*- 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#include "AIX.h"
10#include "Arch/PPC.h"
11#include "CommonArgs.h"
15#include "llvm/Option/ArgList.h"
16#include "llvm/ProfileData/InstrProf.h"
17#include "llvm/Support/Path.h"
18
20using namespace clang::driver;
21using namespace clang::driver::tools;
22using namespace clang::driver::toolchains;
23
24using namespace llvm::opt;
25using namespace llvm::sys;
26
28 const InputInfo &Output,
29 const InputInfoList &Inputs,
30 const ArgList &Args,
31 const char *LinkingOutput) const {
32 ArgStringList CmdArgs;
33
34 const bool IsArch32Bit = getToolChain().getTriple().isArch32Bit();
35 const bool IsArch64Bit = getToolChain().getTriple().isArch64Bit();
36 // Only support 32 and 64 bit.
37 if (!IsArch32Bit && !IsArch64Bit)
38 llvm_unreachable("Unsupported bit width value.");
39
40 // Specify the mode in which the as(1) command operates.
41 if (IsArch32Bit) {
42 CmdArgs.push_back("-a32");
43 } else {
44 // Must be 64-bit, otherwise asserted already.
45 CmdArgs.push_back("-a64");
46 }
47
48 // Accept any mixture of instructions.
49 // On Power for AIX and Linux, this behaviour matches that of GCC for both the
50 // user-provided assembler source case and the compiler-produced assembler
51 // source case. Yet XL with user-provided assembler source would not add this.
52 CmdArgs.push_back("-many");
53
54 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler);
55
56 // Specify assembler output file.
57 assert((Output.isFilename() || Output.isNothing()) && "Invalid output.");
58 if (Output.isFilename()) {
59 CmdArgs.push_back("-o");
60 CmdArgs.push_back(Output.getFilename());
61 }
62
63 // Specify assembler input file.
64 // The system assembler on AIX takes exactly one input file. The driver is
65 // expected to invoke as(1) separately for each assembler source input file.
66 if (Inputs.size() != 1)
67 llvm_unreachable("Invalid number of input files.");
68 const InputInfo &II = Inputs[0];
69 assert((II.isFilename() || II.isNothing()) && "Invalid input.");
70 if (II.isFilename())
71 CmdArgs.push_back(II.getFilename());
72
73 const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("as"));
74 C.addCommand(std::make_unique<Command>(JA, *this, ResponseFileSupport::None(),
75 Exec, CmdArgs, Inputs, Output));
76}
77
78// Determine whether there are any linker options that supply an export list
79// (or equivalent information about what to export) being sent to the linker.
80static bool hasExportListLinkerOpts(const ArgStringList &CmdArgs) {
81 for (size_t i = 0, Size = CmdArgs.size(); i < Size; ++i) {
82 llvm::StringRef ArgString(CmdArgs[i]);
83
84 if (ArgString.startswith("-bE:") || ArgString.startswith("-bexport:") ||
85 ArgString == "-bexpall" || ArgString == "-bexpfull")
86 return true;
87
88 // If we split -b option, check the next opt.
89 if (ArgString == "-b" && i + 1 < Size) {
90 ++i;
91 llvm::StringRef ArgNextString(CmdArgs[i]);
92 if (ArgNextString.startswith("E:") ||
93 ArgNextString.startswith("export:") || ArgNextString == "expall" ||
94 ArgNextString == "expfull")
95 return true;
96 }
97 }
98 return false;
99}
100
102 const InputInfo &Output,
103 const InputInfoList &Inputs, const ArgList &Args,
104 const char *LinkingOutput) const {
105 const AIX &ToolChain = static_cast<const AIX &>(getToolChain());
106 const Driver &D = ToolChain.getDriver();
107 ArgStringList CmdArgs;
108
109 const bool IsArch32Bit = ToolChain.getTriple().isArch32Bit();
110 const bool IsArch64Bit = ToolChain.getTriple().isArch64Bit();
111 // Only support 32 and 64 bit.
112 if (!(IsArch32Bit || IsArch64Bit))
113 llvm_unreachable("Unsupported bit width value.");
114
115 // Force static linking when "-static" is present.
116 if (Args.hasArg(options::OPT_static))
117 CmdArgs.push_back("-bnso");
118
119 // Add options for shared libraries.
120 if (Args.hasArg(options::OPT_shared)) {
121 CmdArgs.push_back("-bM:SRE");
122 CmdArgs.push_back("-bnoentry");
123 }
124
125 // PGO instrumentation generates symbols belonging to special sections, and
126 // the linker needs to place all symbols in a particular section together in
127 // memory; the AIX linker does that under an option.
128 if (Args.hasFlag(options::OPT_fprofile_arcs, options::OPT_fno_profile_arcs,
129 false) ||
130 Args.hasFlag(options::OPT_fprofile_generate,
131 options::OPT_fno_profile_generate, false) ||
132 Args.hasFlag(options::OPT_fprofile_generate_EQ,
133 options::OPT_fno_profile_generate, false) ||
134 Args.hasFlag(options::OPT_fprofile_instr_generate,
135 options::OPT_fno_profile_instr_generate, false) ||
136 Args.hasFlag(options::OPT_fprofile_instr_generate_EQ,
137 options::OPT_fno_profile_instr_generate, false) ||
138 Args.hasFlag(options::OPT_fcs_profile_generate,
139 options::OPT_fno_profile_generate, false) ||
140 Args.hasFlag(options::OPT_fcs_profile_generate_EQ,
141 options::OPT_fno_profile_generate, false) ||
142 Args.hasArg(options::OPT_fcreate_profile) ||
143 Args.hasArg(options::OPT_coverage))
144 CmdArgs.push_back("-bdbg:namedsects:ss");
145
146 if (Arg *A =
147 Args.getLastArg(clang::driver::options::OPT_mxcoff_build_id_EQ)) {
148 StringRef BuildId = A->getValue();
149 if (BuildId[0] != '0' || BuildId[1] != 'x' ||
150 BuildId.find_if_not(llvm::isHexDigit, 2) != StringRef::npos)
151 ToolChain.getDriver().Diag(diag::err_drv_unsupported_option_argument)
152 << A->getSpelling() << BuildId;
153 else {
154 std::string LinkerFlag = "-bdbg:ldrinfo:xcoff_binary_id:0x";
155 if (BuildId.size() % 2) // Prepend a 0 if odd number of digits.
156 LinkerFlag += "0";
157 LinkerFlag += BuildId.drop_front(2).lower();
158 CmdArgs.push_back(Args.MakeArgString(LinkerFlag));
159 }
160 }
161
162 // Specify linker output file.
163 assert((Output.isFilename() || Output.isNothing()) && "Invalid output.");
164 if (Output.isFilename()) {
165 CmdArgs.push_back("-o");
166 CmdArgs.push_back(Output.getFilename());
167 }
168
169 // Set linking mode (i.e., 32/64-bit) and the address of
170 // text and data sections based on arch bit width.
171 if (IsArch32Bit) {
172 CmdArgs.push_back("-b32");
173 CmdArgs.push_back("-bpT:0x10000000");
174 CmdArgs.push_back("-bpD:0x20000000");
175 } else {
176 // Must be 64-bit, otherwise asserted already.
177 CmdArgs.push_back("-b64");
178 CmdArgs.push_back("-bpT:0x100000000");
179 CmdArgs.push_back("-bpD:0x110000000");
180 }
181
182 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles,
183 options::OPT_shared, options::OPT_r)) {
184 auto getCrt0Basename = [&Args, IsArch32Bit] {
185 if (Arg *A = Args.getLastArgNoClaim(options::OPT_p, options::OPT_pg)) {
186 // Enable gprofiling when "-pg" is specified.
187 if (A->getOption().matches(options::OPT_pg))
188 return IsArch32Bit ? "gcrt0.o" : "gcrt0_64.o";
189 // Enable profiling when "-p" is specified.
190 return IsArch32Bit ? "mcrt0.o" : "mcrt0_64.o";
191 }
192 return IsArch32Bit ? "crt0.o" : "crt0_64.o";
193 };
194
195 CmdArgs.push_back(
196 Args.MakeArgString(ToolChain.GetFilePath(getCrt0Basename())));
197
198 CmdArgs.push_back(Args.MakeArgString(
199 ToolChain.GetFilePath(IsArch32Bit ? "crti.o" : "crti_64.o")));
200 }
201
202 // Collect all static constructor and destructor functions in both C and CXX
203 // language link invocations. This has to come before AddLinkerInputs as the
204 // implied option needs to precede any other '-bcdtors' settings or
205 // '-bnocdtors' that '-Wl' might forward.
206 CmdArgs.push_back("-bcdtors:all:0:s");
207
208 // Specify linker input file(s).
209 AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs, JA);
210
211 if (D.isUsingLTO()) {
212 assert(!Inputs.empty() && "Must have at least one input.");
213 addLTOOptions(ToolChain, Args, CmdArgs, Output, Inputs[0],
214 D.getLTOMode() == LTOK_Thin);
215 }
216
217 if (Args.hasArg(options::OPT_shared) && !hasExportListLinkerOpts(CmdArgs)) {
218
219 const char *CreateExportListExec = Args.MakeArgString(
220 path::parent_path(ToolChain.getDriver().ClangExecutable) +
221 "/llvm-nm");
222 ArgStringList CreateExportCmdArgs;
223
224 std::string CreateExportListPath =
225 C.getDriver().GetTemporaryPath("CreateExportList", "exp");
226 const char *ExportList =
227 C.addTempFile(C.getArgs().MakeArgString(CreateExportListPath));
228
229 for (const auto &II : Inputs)
230 if (II.isFilename())
231 CreateExportCmdArgs.push_back(II.getFilename());
232
233 CreateExportCmdArgs.push_back("--export-symbols");
234 CreateExportCmdArgs.push_back("-X");
235 if (IsArch32Bit) {
236 CreateExportCmdArgs.push_back("32");
237 } else {
238 // Must be 64-bit, otherwise asserted already.
239 CreateExportCmdArgs.push_back("64");
240 }
241
242 auto ExpCommand = std::make_unique<Command>(
243 JA, *this, ResponseFileSupport::None(), CreateExportListExec,
244 CreateExportCmdArgs, Inputs, Output);
245 ExpCommand->setRedirectFiles(
246 {std::nullopt, std::string(ExportList), std::nullopt});
247 C.addCommand(std::move(ExpCommand));
248 CmdArgs.push_back(Args.MakeArgString(llvm::Twine("-bE:") + ExportList));
249 }
250
251 // Add directory to library search path.
252 Args.AddAllArgs(CmdArgs, options::OPT_L);
253 if (!Args.hasArg(options::OPT_r)) {
254 ToolChain.AddFilePathLibArgs(Args, CmdArgs);
255 ToolChain.addProfileRTLibs(Args, CmdArgs);
256
257 if (getToolChain().ShouldLinkCXXStdlib(Args))
258 getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs);
259
260 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) {
261 AddRunTimeLibs(ToolChain, D, CmdArgs, Args);
262
263 // Add OpenMP runtime if -fopenmp is specified.
264 if (Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ,
265 options::OPT_fno_openmp, false)) {
266 switch (ToolChain.getDriver().getOpenMPRuntime(Args)) {
268 CmdArgs.push_back("-lomp");
269 break;
271 CmdArgs.push_back("-liomp5");
272 break;
274 CmdArgs.push_back("-lgomp");
275 break;
277 // Already diagnosed.
278 break;
279 }
280 }
281
282 // Support POSIX threads if "-pthreads" or "-pthread" is present.
283 if (Args.hasArg(options::OPT_pthreads, options::OPT_pthread))
284 CmdArgs.push_back("-lpthreads");
285
286 if (D.CCCIsCXX())
287 CmdArgs.push_back("-lm");
288
289 CmdArgs.push_back("-lc");
290
291 if (Args.hasArgNoClaim(options::OPT_p, options::OPT_pg)) {
292 CmdArgs.push_back(Args.MakeArgString((llvm::Twine("-L") + D.SysRoot) +
293 "/lib/profiled"));
294 CmdArgs.push_back(Args.MakeArgString((llvm::Twine("-L") + D.SysRoot) +
295 "/usr/lib/profiled"));
296 }
297 }
298 }
299
300 const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath());
301 C.addCommand(std::make_unique<Command>(JA, *this, ResponseFileSupport::None(),
302 Exec, CmdArgs, Inputs, Output));
303}
304
305/// AIX - AIX tool chain which can call as(1) and ld(1) directly.
306AIX::AIX(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
307 : ToolChain(D, Triple, Args) {
308 getProgramPaths().push_back(getDriver().getInstalledDir());
309 if (getDriver().getInstalledDir() != getDriver().Dir)
310 getProgramPaths().push_back(getDriver().Dir);
311
312 ParseInlineAsmUsingAsmParser = Args.hasFlag(
313 options::OPT_fintegrated_as, options::OPT_fno_integrated_as, true);
314 getLibraryPaths().push_back(getDriver().SysRoot + "/usr/lib");
315}
316
317// Returns the effective header sysroot path to use.
318// This comes from either -isysroot or --sysroot.
319llvm::StringRef
320AIX::GetHeaderSysroot(const llvm::opt::ArgList &DriverArgs) const {
321 if (DriverArgs.hasArg(options::OPT_isysroot))
322 return DriverArgs.getLastArgValue(options::OPT_isysroot);
323 if (!getDriver().SysRoot.empty())
324 return getDriver().SysRoot;
325 return "/";
326}
327
328void AIX::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
329 ArgStringList &CC1Args) const {
330 // Return if -nostdinc is specified as a driver option.
331 if (DriverArgs.hasArg(options::OPT_nostdinc))
332 return;
333
334 llvm::StringRef Sysroot = GetHeaderSysroot(DriverArgs);
335 const Driver &D = getDriver();
336
337 if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) {
339 // Add the PowerPC intrinsic headers (<resource>/include/ppc_wrappers)
340 path::append(P, "include", "ppc_wrappers");
341 addSystemInclude(DriverArgs, CC1Args, P);
342 // Add the Clang builtin headers (<resource>/include)
343 addSystemInclude(DriverArgs, CC1Args, path::parent_path(P.str()));
344 }
345
346 // Return if -nostdlibinc is specified as a driver option.
347 if (DriverArgs.hasArg(options::OPT_nostdlibinc))
348 return;
349
350 // Add <sysroot>/usr/include.
351 SmallString<128> UP(Sysroot);
352 path::append(UP, "/usr/include");
353 addSystemInclude(DriverArgs, CC1Args, UP.str());
354}
355
357 const llvm::opt::ArgList &DriverArgs,
358 llvm::opt::ArgStringList &CC1Args) const {
359
360 if (DriverArgs.hasArg(options::OPT_nostdinc) ||
361 DriverArgs.hasArg(options::OPT_nostdincxx) ||
362 DriverArgs.hasArg(options::OPT_nostdlibinc))
363 return;
364
365 switch (GetCXXStdlibType(DriverArgs)) {
367 llvm::report_fatal_error(
368 "picking up libstdc++ headers is unimplemented on AIX");
370 llvm::StringRef Sysroot = GetHeaderSysroot(DriverArgs);
371 SmallString<128> PathCPP(Sysroot);
372 llvm::sys::path::append(PathCPP, "opt/IBM/openxlCSDK", "include", "c++",
373 "v1");
374 addSystemInclude(DriverArgs, CC1Args, PathCPP.str());
375 // Required in order to suppress conflicting C++ overloads in the system
376 // libc headers that were used by XL C++.
377 CC1Args.push_back("-D__LIBC_NO_CPP_MATH_OVERLOADS__");
378 return;
379 }
380 }
381
382 llvm_unreachable("Unexpected C++ library type; only libc++ is supported.");
383}
384
385void AIX::AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args,
386 llvm::opt::ArgStringList &CmdArgs) const {
387 switch (GetCXXStdlibType(Args)) {
389 llvm::report_fatal_error("linking libstdc++ unimplemented on AIX");
391 CmdArgs.push_back("-lc++");
392 if (Args.hasArg(options::OPT_fexperimental_library))
393 CmdArgs.push_back("-lc++experimental");
394 CmdArgs.push_back("-lc++abi");
395 return;
396 }
397
398 llvm_unreachable("Unexpected C++ library type; only libc++ is supported.");
399}
400
401void AIX::addProfileRTLibs(const llvm::opt::ArgList &Args,
402 llvm::opt::ArgStringList &CmdArgs) const {
403 // Add linker option -u__llvm_profile_runtime to cause runtime
404 // initialization to occur.
405 if (needsProfileRT(Args))
406 CmdArgs.push_back(Args.MakeArgString(
407 Twine("-u", llvm::getInstrProfRuntimeHookVarName())));
408 ToolChain::addProfileRTLibs(Args, CmdArgs);
409}
410
413}
414
417}
418
419auto AIX::buildAssembler() const -> Tool * { return new aix::Assembler(*this); }
420
421auto AIX::buildLinker() const -> Tool * { return new aix::Linker(*this); }
static bool hasExportListLinkerOpts(const ArgStringList &CmdArgs)
Definition: AIX.cpp:80
StringRef P
Compilation - A set of tasks to perform for a single driver invocation.
Definition: Compilation.h:45
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition: Driver.h:77
std::string SysRoot
sysroot, if present
Definition: Driver.h:183
OpenMPRuntimeKind getOpenMPRuntime(const llvm::opt::ArgList &Args) const
Compute the desired OpenMP runtime from the flags provided.
Definition: Driver.cpp:749
DiagnosticBuilder Diag(unsigned DiagID) const
Definition: Driver.h:144
std::string ClangExecutable
The original path to the clang executable.
Definition: Driver.h:158
LTOKind getLTOMode(bool IsOffload=false) const
Get the specific kind of LTO being performed.
Definition: Driver.h:704
std::string ResourceDir
The path to the compiler resource directory.
Definition: Driver.h:167
bool isUsingLTO(bool IsOffload=false) const
Returns true if we are performing any kind of LTO.
Definition: Driver.h:699
@ OMPRT_IOMP5
The legacy name for the LLVM OpenMP runtime from when it was the Intel OpenMP runtime.
Definition: Driver.h:140
@ OMPRT_OMP
The LLVM OpenMP runtime.
Definition: Driver.h:130
@ OMPRT_Unknown
An unknown OpenMP runtime.
Definition: Driver.h:126
@ OMPRT_GOMP
The GNU OpenMP runtime.
Definition: Driver.h:135
bool CCCIsCXX() const
Whether the driver should follow g++ like behavior.
Definition: Driver.h:216
InputInfo - Wrapper for information about an input source.
Definition: InputInfo.h:22
const char * getFilename() const
Definition: InputInfo.h:83
bool isNothing() const
Definition: InputInfo.h:74
bool isFilename() const
Definition: InputInfo.h:75
ToolChain - Access to tools for a single platform.
Definition: ToolChain.h:91
static void addSystemInclude(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, const Twine &Path)
Utility function to add a system include directory to CC1 arguments.
Definition: ToolChain.cpp:969
std::string GetFilePath(const char *Name) const
Definition: ToolChain.cpp:660
static bool needsProfileRT(const llvm::opt::ArgList &Args)
needsProfileRT - returns true if instrumentation profile is on.
Definition: ToolChain.cpp:631
const Driver & getDriver() const
Definition: ToolChain.h:236
path_list & getProgramPaths()
Definition: ToolChain.h:281
const llvm::Triple & getTriple() const
Definition: ToolChain.h:238
virtual void addProfileRTLibs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const
addProfileRTLibs - When -fprofile-instr-profile is specified, try to pass a suitable profile runtime ...
Definition: ToolChain.cpp:873
std::string GetLinkerPath(bool *LinkerIsLLD=nullptr) const
Returns the linker path, respecting the -fuse-ld= argument to determine the linker suffix or name.
Definition: ToolChain.cpp:668
void AddFilePathLibArgs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const
AddFilePathLibArgs - Add each thing in getFilePaths() as a "-L" option.
Definition: ToolChain.cpp:1096
virtual CXXStdlibType GetCXXStdlibType(const llvm::opt::ArgList &Args) const
Definition: ToolChain.cpp:943
path_list & getLibraryPaths()
Definition: ToolChain.h:275
Tool - Information on a specific compilation tool.
Definition: Tool.h:32
const ToolChain & getToolChain() const
Definition: Tool.h:52
Tool * buildAssembler() const override
Definition: AIX.cpp:419
void AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override
Add the clang cc1 arguments for system include paths.
Definition: AIX.cpp:328
void addProfileRTLibs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const override
addProfileRTLibs - When -fprofile-instr-profile is specified, try to pass a suitable profile runtime ...
Definition: AIX.cpp:401
CXXStdlibType GetDefaultCXXStdlibType() const override
Definition: AIX.cpp:411
AIX(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args)
AIX - AIX tool chain which can call as(1) and ld(1) directly.
Definition: AIX.cpp:306
RuntimeLibType GetDefaultRuntimeLibType() const override
GetDefaultRuntimeLibType - Get the default runtime library variant to use.
Definition: AIX.cpp:415
Tool * buildLinker() const override
Definition: AIX.cpp:421
void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const override
AddCXXStdlibLibArgs - Add the system specific linker arguments to use for the given C++ standard libr...
Definition: AIX.cpp:385
void AddClangCXXStdlibIncludeArgs(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override
AddClangCXXStdlibIncludeArgs - Add the clang -cc1 level arguments to set the include paths to use for...
Definition: AIX.cpp:356
void ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const llvm::opt::ArgList &TCArgs, const char *LinkingOutput) const override
ConstructJob - Construct jobs to perform the action JA, writing to Output and with Inputs,...
Definition: AIX.cpp:27
void ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const llvm::opt::ArgList &TCArgs, const char *LinkingOutput) const override
ConstructJob - Construct jobs to perform the action JA, writing to Output and with Inputs,...
Definition: AIX.cpp:101
void AddRunTimeLibs(const ToolChain &TC, const Driver &D, llvm::opt::ArgStringList &CmdArgs, const llvm::opt::ArgList &Args)
void addLTOOptions(const ToolChain &ToolChain, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs, const InputInfo &Output, const InputInfo &Input, bool IsThinLTO)
void AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs, const JobAction &JA)
@ C
Languages that the frontend can parse and compile.
static constexpr ResponseFileSupport None()
Returns a ResponseFileSupport indicating that response files are not supported.
Definition: Job.h:78