Daniel Dunbar | 47ac7d2 | 2009-03-18 06:00:36 +0000 | [diff] [blame] | 1 | //===--- Tools.cpp - Tools Implementations ------------------------------*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #include "Tools.h" |
| 11 | |
Daniel Dunbar | 1d46033 | 2009-03-18 10:01:51 +0000 | [diff] [blame] | 12 | #include "clang/Driver/Action.h" |
Daniel Dunbar | 871adcf | 2009-03-18 07:06:02 +0000 | [diff] [blame] | 13 | #include "clang/Driver/Arg.h" |
Daniel Dunbar | b488c1d | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 14 | #include "clang/Driver/ArgList.h" |
Daniel Dunbar | 1d46033 | 2009-03-18 10:01:51 +0000 | [diff] [blame] | 15 | #include "clang/Driver/Driver.h" // FIXME: Remove? |
| 16 | #include "clang/Driver/DriverDiagnostic.h" // FIXME: Remove? |
Daniel Dunbar | 871adcf | 2009-03-18 07:06:02 +0000 | [diff] [blame] | 17 | #include "clang/Driver/Compilation.h" |
| 18 | #include "clang/Driver/Job.h" |
Daniel Dunbar | b488c1d | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 19 | #include "clang/Driver/HostInfo.h" |
| 20 | #include "clang/Driver/Option.h" |
| 21 | #include "clang/Driver/ToolChain.h" |
Daniel Dunbar | 871adcf | 2009-03-18 07:06:02 +0000 | [diff] [blame] | 22 | #include "clang/Driver/Util.h" |
| 23 | |
| 24 | #include "llvm/ADT/SmallVector.h" |
| 25 | |
| 26 | #include "InputInfo.h" |
| 27 | |
Daniel Dunbar | 47ac7d2 | 2009-03-18 06:00:36 +0000 | [diff] [blame] | 28 | using namespace clang::driver; |
| 29 | using namespace clang::driver::tools; |
| 30 | |
| 31 | void Clang::ConstructJob(Compilation &C, const JobAction &JA, |
Daniel Dunbar | 871adcf | 2009-03-18 07:06:02 +0000 | [diff] [blame] | 32 | Job &Dest, |
| 33 | const InputInfo &Output, |
Daniel Dunbar | 62cf601 | 2009-03-18 06:07:59 +0000 | [diff] [blame] | 34 | const InputInfoList &Inputs, |
Daniel Dunbar | 1d46033 | 2009-03-18 10:01:51 +0000 | [diff] [blame] | 35 | const ArgList &Args, |
Daniel Dunbar | 47ac7d2 | 2009-03-18 06:00:36 +0000 | [diff] [blame] | 36 | const char *LinkingOutput) const { |
Daniel Dunbar | b488c1d | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 37 | ArgStringList CmdArgs; |
| 38 | |
Daniel Dunbar | 1d46033 | 2009-03-18 10:01:51 +0000 | [diff] [blame] | 39 | if (isa<AnalyzeJobAction>(JA)) { |
| 40 | assert(JA.getType() == types::TY_Plist && "Invalid output type."); |
| 41 | CmdArgs.push_back("-analyze"); |
| 42 | } else if (isa<PreprocessJobAction>(JA)) { |
| 43 | CmdArgs.push_back("-E"); |
| 44 | } else if (isa<PrecompileJobAction>(JA)) { |
| 45 | // No special option needed, driven by -x. |
| 46 | // |
| 47 | // FIXME: Don't drive this by -x, that is gross. |
| 48 | |
| 49 | // FIXME: This is a total hack. Copy the input header file |
| 50 | // to the output, so that it can be -include'd by clang. |
| 51 | assert(Inputs.size() == 1 && "Cannot make PCH with multiple inputs."); |
| 52 | assert(!Output.isPipe() && "Unexpected pipe"); |
| 53 | assert(!Inputs[0].isPipe() && "Unexpected pipe"); |
| 54 | const char *InputPath = Inputs[0].getInputFilename(); |
| 55 | llvm::sys::Path OutputPath(Output.getInputFilename()); |
| 56 | OutputPath.eraseComponent(); |
| 57 | if (OutputPath.empty()) |
| 58 | OutputPath = llvm::sys::Path(InputPath).getLast(); |
Daniel Dunbar | b488c1d | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 59 | else |
Daniel Dunbar | 1d46033 | 2009-03-18 10:01:51 +0000 | [diff] [blame] | 60 | OutputPath.appendComponent(llvm::sys::Path(InputPath).getLast()); |
| 61 | if (!OutputPath.exists()) { |
| 62 | ArgStringList CpArgs; |
| 63 | CpArgs.push_back(InputPath); |
| 64 | CpArgs.push_back(Args.MakeArgString(OutputPath.c_str())); |
| 65 | C.getJobs().addJob(new Command("cp", CpArgs)); |
| 66 | } |
| 67 | } else { |
| 68 | assert(isa<CompileJobAction>(JA) && "Invalid action for clang tool."); |
| 69 | |
| 70 | if (JA.getType() == types::TY_Nothing) { |
| 71 | CmdArgs.push_back("-fsyntax-only"); |
| 72 | } else if (JA.getType() == types::TY_LLVMAsm) { |
| 73 | CmdArgs.push_back("-emit-llvm"); |
| 74 | } else if (JA.getType() == types::TY_LLVMBC) { |
| 75 | CmdArgs.push_back("-emit-llvm-bc"); |
| 76 | } else if (JA.getType() == types::TY_PP_Asm) { |
| 77 | CmdArgs.push_back("-S"); |
| 78 | } |
Daniel Dunbar | b488c1d | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 79 | } |
| 80 | |
Daniel Dunbar | 1d46033 | 2009-03-18 10:01:51 +0000 | [diff] [blame] | 81 | // The make clang go fast button. |
| 82 | CmdArgs.push_back("-disable-free"); |
| 83 | |
| 84 | if (isa<AnalyzeJobAction>(JA)) { |
| 85 | // Add default argument set. |
| 86 | // |
| 87 | // FIXME: Move into clang? |
| 88 | CmdArgs.push_back("-warn-dead-stores"); |
| 89 | CmdArgs.push_back("-checker-cfref"); |
| 90 | CmdArgs.push_back("-warn-objc-methodsigs"); |
| 91 | // Do not enable the missing -dealloc check. |
| 92 | // '-warn-objc-missing-dealloc', |
| 93 | CmdArgs.push_back("-warn-objc-unused-ivars"); |
| 94 | |
| 95 | CmdArgs.push_back("-analyzer-output=plist"); |
| 96 | |
| 97 | // Add -Xanalyzer arguments when running as analyzer. |
| 98 | Args.AddAllArgValues(CmdArgs, options::OPT_Xanalyzer); |
| 99 | } else { |
| 100 | // Perform argument translation for LLVM backend. This |
| 101 | // takes some care in reconciling with llvm-gcc. The |
| 102 | // issue is that llvm-gcc translates these options based on |
| 103 | // the values in cc1, whereas we are processing based on |
| 104 | // the driver arguments. |
| 105 | // |
| 106 | // FIXME: This is currently broken for -f flags when -fno |
| 107 | // variants are present. |
| 108 | |
| 109 | // This comes from the default translation the driver + cc1 |
| 110 | // would do to enable flag_pic. |
| 111 | // |
| 112 | // FIXME: Centralize this code. |
| 113 | bool PICEnabled = (Args.hasArg(options::OPT_fPIC) || |
| 114 | Args.hasArg(options::OPT_fpic) || |
| 115 | Args.hasArg(options::OPT_fPIE) || |
| 116 | Args.hasArg(options::OPT_fpie)); |
| 117 | bool PICDisabled = (Args.hasArg(options::OPT_mkernel) || |
| 118 | Args.hasArg(options::OPT_static)); |
| 119 | const char *Model = getToolChain().GetForcedPicModel(); |
| 120 | if (!Model) { |
| 121 | if (Args.hasArg(options::OPT_mdynamic_no_pic)) |
| 122 | Model = "dynamic-no-pic"; |
| 123 | else if (PICDisabled) |
| 124 | Model = "static"; |
| 125 | else if (PICEnabled) |
| 126 | Model = "pic"; |
| 127 | else |
| 128 | Model = getToolChain().GetDefaultRelocationModel(); |
| 129 | } |
| 130 | CmdArgs.push_back("--relocation-model"); |
| 131 | CmdArgs.push_back(Model); |
| 132 | |
| 133 | if (Args.hasArg(options::OPT_ftime_report)) |
| 134 | CmdArgs.push_back("--time-passes"); |
| 135 | // FIXME: Set --enable-unsafe-fp-math. |
| 136 | if (!Args.hasArg(options::OPT_fomit_frame_pointer)) |
| 137 | CmdArgs.push_back("--disable-fp-elim"); |
| 138 | if (!Args.hasFlag(options::OPT_fzero_initialized_in_bss, |
| 139 | options::OPT_fno_zero_initialized_in_bss, |
| 140 | true)) |
| 141 | CmdArgs.push_back("--nozero-initialized-in-bss"); |
| 142 | if (Args.hasArg(options::OPT_dA)) |
| 143 | CmdArgs.push_back("--asm-verbose"); |
| 144 | if (Args.hasArg(options::OPT_fdebug_pass_structure)) |
| 145 | CmdArgs.push_back("--debug-pass=Structure"); |
| 146 | if (Args.hasArg(options::OPT_fdebug_pass_arguments)) |
| 147 | CmdArgs.push_back("--debug-pass=Arguments"); |
| 148 | // FIXME: set --inline-threshhold=50 if (optimize_size || optimize |
| 149 | // < 3) |
| 150 | if (Args.hasFlag(options::OPT_funwind_tables, |
| 151 | options::OPT_fno_unwind_tables, |
| 152 | getToolChain().IsUnwindTablesDefault())) |
| 153 | CmdArgs.push_back("--unwind-tables=1"); |
| 154 | else |
| 155 | CmdArgs.push_back("--unwind-tables=0"); |
| 156 | if (!Args.hasFlag(options::OPT_mred_zone, |
| 157 | options::OPT_mno_red_zone, |
| 158 | true)) |
| 159 | CmdArgs.push_back("--disable-red-zone"); |
| 160 | if (Args.hasFlag(options::OPT_msoft_float, |
| 161 | options::OPT_mno_soft_float, |
| 162 | false)) |
| 163 | CmdArgs.push_back("--soft-float"); |
| 164 | |
| 165 | // FIXME: Need target hooks. |
| 166 | if (memcmp(getToolChain().getPlatform().c_str(), "darwin", 6) == 0) { |
| 167 | if (getToolChain().getArchName() == "x86_64") |
| 168 | CmdArgs.push_back("--mcpu=core2"); |
| 169 | else if (getToolChain().getArchName() == "i386") |
| 170 | CmdArgs.push_back("--mcpu=yonah"); |
| 171 | } |
| 172 | |
| 173 | // FIXME: Ignores ordering. Also, we need to find a realistic |
| 174 | // solution for this. |
| 175 | static const struct { |
| 176 | options::ID Pos, Neg; |
| 177 | const char *Name; |
| 178 | } FeatureOptions[] = { |
| 179 | { options::OPT_mmmx, options::OPT_mno_mmx, "mmx" }, |
| 180 | { options::OPT_msse, options::OPT_mno_sse, "sse" }, |
| 181 | { options::OPT_msse2, options::OPT_mno_sse2, "sse2" }, |
| 182 | { options::OPT_msse3, options::OPT_mno_sse3, "sse3" }, |
| 183 | { options::OPT_mssse3, options::OPT_mno_ssse3, "ssse3" }, |
| 184 | { options::OPT_msse41, options::OPT_mno_sse41, "sse41" }, |
| 185 | { options::OPT_msse42, options::OPT_mno_sse42, "sse42" }, |
| 186 | { options::OPT_msse4a, options::OPT_mno_sse4a, "sse4a" }, |
| 187 | { options::OPT_m3dnow, options::OPT_mno_3dnow, "3dnow" }, |
| 188 | { options::OPT_m3dnowa, options::OPT_mno_3dnowa, "3dnowa" } |
| 189 | }; |
| 190 | const unsigned NumFeatureOptions = |
| 191 | sizeof(FeatureOptions)/sizeof(FeatureOptions[0]); |
| 192 | |
| 193 | // FIXME: Avoid std::string |
| 194 | std::string Attrs; |
| 195 | for (unsigned i=0; i < NumFeatureOptions; ++i) { |
| 196 | if (Args.hasArg(FeatureOptions[i].Pos)) { |
| 197 | Attrs += '+'; |
| 198 | Attrs += FeatureOptions[i].Name; |
| 199 | } else if (Args.hasArg(FeatureOptions[i].Neg)) { |
| 200 | Attrs += '-'; |
| 201 | Attrs += FeatureOptions[i].Name; |
| 202 | } |
| 203 | } |
| 204 | if (!Attrs.empty()) { |
| 205 | CmdArgs.push_back("--mattr"); |
| 206 | CmdArgs.push_back(Args.MakeArgString(Attrs.c_str())); |
| 207 | } |
| 208 | |
| 209 | if (Args.hasFlag(options::OPT_fmath_errno, |
| 210 | options::OPT_fno_math_errno, |
| 211 | getToolChain().IsMathErrnoDefault())) |
| 212 | CmdArgs.push_back("--fmath-errno=1"); |
| 213 | else |
| 214 | CmdArgs.push_back("--fmath-errno=0"); |
| 215 | |
| 216 | if (Arg *A = Args.getLastArg(options::OPT_flimited_precision_EQ)) { |
| 217 | CmdArgs.push_back("--limit-float-precision"); |
| 218 | CmdArgs.push_back(A->getValue(Args)); |
| 219 | } |
| 220 | |
| 221 | // FIXME: Add --stack-protector-buffer-size=<xxx> on |
| 222 | // -fstack-protect. |
| 223 | |
| 224 | Args.AddLastArg(CmdArgs, options::OPT_MD); |
| 225 | Args.AddLastArg(CmdArgs, options::OPT_MM); |
| 226 | Args.AddAllArgs(CmdArgs, options::OPT_MF); |
| 227 | Args.AddLastArg(CmdArgs, options::OPT_MP); |
| 228 | Args.AddAllArgs(CmdArgs, options::OPT_MT); |
| 229 | |
| 230 | Arg *Unsupported = Args.getLastArg(options::OPT_M); |
| 231 | if (!Unsupported) |
| 232 | Unsupported = Args.getLastArg(options::OPT_MM); |
| 233 | if (!Unsupported) |
| 234 | Unsupported = Args.getLastArg(options::OPT_MG); |
| 235 | if (!Unsupported) |
| 236 | Unsupported = Args.getLastArg(options::OPT_MQ); |
| 237 | if (Unsupported) { |
| 238 | const Driver &D = getToolChain().getHost().getDriver(); |
| 239 | D.Diag(clang::diag::err_drv_unsupported_opt) |
| 240 | << Unsupported->getOption().getName(); |
| 241 | } |
| 242 | } |
| 243 | |
| 244 | Args.AddAllArgs(CmdArgs, options::OPT_v); |
| 245 | Args.AddAllArgs(CmdArgs, options::OPT_D, options::OPT_U); |
| 246 | Args.AddAllArgs(CmdArgs, options::OPT_I_Group, options::OPT_F); |
| 247 | Args.AddLastArg(CmdArgs, options::OPT_P); |
| 248 | Args.AddAllArgs(CmdArgs, options::OPT_mmacosx_version_min_EQ); |
| 249 | |
| 250 | // Special case debug options to only pass -g to clang. This is |
| 251 | // wrong. |
| 252 | if (Args.hasArg(options::OPT_g_Group)) |
| 253 | CmdArgs.push_back("-g"); |
| 254 | |
| 255 | Args.AddLastArg(CmdArgs, options::OPT_nostdinc); |
| 256 | |
| 257 | // FIXME: Clang isn't going to accept just anything here. |
| 258 | Args.AddAllArgs(CmdArgs, options::OPT_i_Group); |
| 259 | |
| 260 | // Automatically load .pth or .gch files which match -include |
| 261 | // options. It's wonky, but we include looking for .gch so we can |
| 262 | // support seamless replacement into a build system already set up |
| 263 | // to be generating .gch files. |
| 264 | |
| 265 | // FIXME: Need to use an iterator for this to be efficient. |
| 266 | for (ArgList::const_iterator |
| 267 | it = Args.begin(), ie = Args.end(); it != ie; ++it) { |
| 268 | const Arg *A = *it; |
| 269 | if (A->getOption().matches(options::OPT_include)) { |
| 270 | llvm::sys::Path P(A->getValue(Args)); |
| 271 | P.appendSuffix("pth"); |
| 272 | if (P.exists()) { |
| 273 | CmdArgs.push_back("-token-cache"); |
| 274 | CmdArgs.push_back(Args.MakeArgString(P.c_str())); |
| 275 | } else { |
| 276 | P.eraseSuffix(); |
| 277 | P.appendSuffix("gch"); |
| 278 | if (P.exists()) { |
| 279 | CmdArgs.push_back("-token-cache"); |
| 280 | CmdArgs.push_back(Args.MakeArgString(P.c_str())); |
| 281 | } |
| 282 | } |
| 283 | } |
| 284 | } |
| 285 | |
| 286 | // Manually translate -O to -O1; let clang reject others. |
| 287 | if (Arg *A = Args.getLastArg(options::OPT_O)) { |
| 288 | if (A->getValue(Args)[0] == '\0') |
| 289 | CmdArgs.push_back("-O1"); |
| 290 | else |
| 291 | CmdArgs.push_back(A->getValue(Args)); |
| 292 | } |
| 293 | |
| 294 | Args.AddAllArgs(CmdArgs, options::OPT_clang_W_Group, options::OPT_pedantic_Group); |
| 295 | Args.AddLastArg(CmdArgs, options::OPT_w); |
| 296 | Args.AddAllArgs(CmdArgs, options::OPT_std_EQ, options::OPT_ansi, |
| 297 | options::OPT_trigraphs); |
| 298 | |
| 299 | if (Arg *A = Args.getLastArg(options::OPT_ftemplate_depth_)) { |
| 300 | CmdArgs.push_back("-ftemplate-depth"); |
| 301 | CmdArgs.push_back(A->getValue(Args)); |
| 302 | } |
| 303 | |
| 304 | Args.AddAllArgs(CmdArgs, options::OPT_clang_f_Group); |
| 305 | |
| 306 | Args.AddLastArg(CmdArgs, options::OPT_dM); |
| 307 | |
| 308 | Args.AddAllArgValues(CmdArgs, options::OPT_Xclang); |
| 309 | |
| 310 | // FIXME: Always pass the full triple once we aren't concerned with |
| 311 | // ccc compat. |
| 312 | CmdArgs.push_back("-arch"); |
| 313 | CmdArgs.push_back(getToolChain().getArchName().c_str()); |
| 314 | |
Daniel Dunbar | b488c1d | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 315 | if (Output.isPipe()) { |
| 316 | CmdArgs.push_back("-o"); |
| 317 | CmdArgs.push_back("-"); |
| 318 | } else if (const char *N = Output.getInputFilename()) { |
| 319 | CmdArgs.push_back("-o"); |
| 320 | CmdArgs.push_back(N); |
| 321 | } |
| 322 | |
Daniel Dunbar | 1d46033 | 2009-03-18 10:01:51 +0000 | [diff] [blame] | 323 | for (InputInfoList::const_iterator |
| 324 | it = Inputs.begin(), ie = Inputs.end(); it != ie; ++it) { |
| 325 | const InputInfo &II = *it; |
| 326 | CmdArgs.push_back("-x"); |
| 327 | CmdArgs.push_back(types::getTypeName(II.getType())); |
| 328 | if (II.isPipe()) |
| 329 | CmdArgs.push_back("-"); |
| 330 | else |
| 331 | CmdArgs.push_back(II.getInputFilename()); |
| 332 | } |
| 333 | |
| 334 | const char *Exec = |
| 335 | Args.MakeArgString(getToolChain().GetProgramPath(C, "clang").c_str()); |
| 336 | Dest.addCommand(new Command(Exec, CmdArgs)); |
Daniel Dunbar | 47ac7d2 | 2009-03-18 06:00:36 +0000 | [diff] [blame] | 337 | } |
| 338 | |
Daniel Dunbar | b488c1d | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 339 | void gcc::Common::ConstructJob(Compilation &C, const JobAction &JA, |
| 340 | Job &Dest, |
| 341 | const InputInfo &Output, |
| 342 | const InputInfoList &Inputs, |
Daniel Dunbar | 1d46033 | 2009-03-18 10:01:51 +0000 | [diff] [blame] | 343 | const ArgList &Args, |
Daniel Dunbar | b488c1d | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 344 | const char *LinkingOutput) const { |
| 345 | ArgStringList CmdArgs; |
Daniel Dunbar | 47ac7d2 | 2009-03-18 06:00:36 +0000 | [diff] [blame] | 346 | |
Daniel Dunbar | b488c1d | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 347 | for (ArgList::const_iterator |
Daniel Dunbar | 1d46033 | 2009-03-18 10:01:51 +0000 | [diff] [blame] | 348 | it = Args.begin(), ie = Args.end(); it != ie; ++it) { |
Daniel Dunbar | b488c1d | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 349 | Arg *A = *it; |
| 350 | if (A->getOption().hasForwardToGCC()) |
Daniel Dunbar | 1d46033 | 2009-03-18 10:01:51 +0000 | [diff] [blame] | 351 | A->render(Args, CmdArgs); |
Daniel Dunbar | b488c1d | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 352 | } |
| 353 | |
| 354 | RenderExtraToolArgs(CmdArgs); |
| 355 | |
| 356 | // If using a driver driver, force the arch. |
| 357 | if (getToolChain().getHost().useDriverDriver()) { |
| 358 | CmdArgs.push_back("-arch"); |
| 359 | CmdArgs.push_back(getToolChain().getArchName().c_str()); |
| 360 | } |
| 361 | |
| 362 | if (Output.isPipe()) { |
| 363 | CmdArgs.push_back("-o"); |
| 364 | CmdArgs.push_back("-"); |
| 365 | } else if (const char *N = Output.getInputFilename()) { |
| 366 | CmdArgs.push_back("-o"); |
| 367 | CmdArgs.push_back(N); |
| 368 | } else |
| 369 | CmdArgs.push_back("-fsyntax-only"); |
| 370 | |
| 371 | |
| 372 | // Only pass -x if gcc will understand it; otherwise hope gcc |
| 373 | // understands the suffix correctly. The main use case this would go |
| 374 | // wrong in is for linker inputs if they happened to have an odd |
| 375 | // suffix; really the only way to get this to happen is a command |
| 376 | // like '-x foobar a.c' which will treat a.c like a linker input. |
| 377 | // |
| 378 | // FIXME: For the linker case specifically, can we safely convert |
| 379 | // inputs into '-Wl,' options? |
| 380 | for (InputInfoList::const_iterator |
| 381 | it = Inputs.begin(), ie = Inputs.end(); it != ie; ++it) { |
| 382 | const InputInfo &II = *it; |
| 383 | if (types::canTypeBeUserSpecified(II.getType())) { |
| 384 | CmdArgs.push_back("-x"); |
| 385 | CmdArgs.push_back(types::getTypeName(II.getType())); |
| 386 | } |
| 387 | |
| 388 | if (II.isPipe()) |
| 389 | CmdArgs.push_back("-"); |
| 390 | else |
| 391 | // FIXME: Linker inputs |
| 392 | CmdArgs.push_back(II.getInputFilename()); |
| 393 | } |
| 394 | |
| 395 | Dest.addCommand(new Command("gcc", CmdArgs)); |
Daniel Dunbar | 47ac7d2 | 2009-03-18 06:00:36 +0000 | [diff] [blame] | 396 | } |
| 397 | |
Daniel Dunbar | b488c1d | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 398 | void gcc::Preprocess::RenderExtraToolArgs(ArgStringList &CmdArgs) const { |
| 399 | CmdArgs.push_back("-E"); |
Daniel Dunbar | 47ac7d2 | 2009-03-18 06:00:36 +0000 | [diff] [blame] | 400 | } |
| 401 | |
Daniel Dunbar | b488c1d | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 402 | void gcc::Precompile::RenderExtraToolArgs(ArgStringList &CmdArgs) const { |
| 403 | // The type is good enough. |
Daniel Dunbar | 47ac7d2 | 2009-03-18 06:00:36 +0000 | [diff] [blame] | 404 | } |
| 405 | |
Daniel Dunbar | b488c1d | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 406 | void gcc::Compile::RenderExtraToolArgs(ArgStringList &CmdArgs) const { |
| 407 | CmdArgs.push_back("-S"); |
Daniel Dunbar | 47ac7d2 | 2009-03-18 06:00:36 +0000 | [diff] [blame] | 408 | } |
| 409 | |
Daniel Dunbar | b488c1d | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 410 | void gcc::Assemble::RenderExtraToolArgs(ArgStringList &CmdArgs) const { |
| 411 | CmdArgs.push_back("-c"); |
Daniel Dunbar | 47ac7d2 | 2009-03-18 06:00:36 +0000 | [diff] [blame] | 412 | } |
Daniel Dunbar | b488c1d | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 413 | |
| 414 | void gcc::Link::RenderExtraToolArgs(ArgStringList &CmdArgs) const { |
| 415 | // The types are (hopefully) good enough. |
| 416 | } |
| 417 | |