Deleted Added
sdiff udiff text old ( 263508 ) new ( 266715 )
full compact
1//===--- ToolChain.cpp - Collections of tools for one platform ------------===//
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//===----------------------------------------------------------------------===//

--- 416 unchanged lines hidden (view full) ---

425
426void ToolChain::AddCCKextLibArgs(const ArgList &Args,
427 ArgStringList &CmdArgs) const {
428 CmdArgs.push_back("-lcc_kext");
429}
430
431bool ToolChain::AddFastMathRuntimeIfAvailable(const ArgList &Args,
432 ArgStringList &CmdArgs) const {
433 // Check if -ffast-math or -funsafe-math is enabled.
434 Arg *A = Args.getLastArg(options::OPT_ffast_math,
435 options::OPT_fno_fast_math,
436 options::OPT_funsafe_math_optimizations,
437 options::OPT_fno_unsafe_math_optimizations);
438
439 if (!A || A->getOption().getID() == options::OPT_fno_fast_math ||
440 A->getOption().getID() == options::OPT_fno_unsafe_math_optimizations)
441 return false;
442
443 // If crtfastmath.o exists add it to the arguments.
444 std::string Path = GetFilePath("crtfastmath.o");
445 if (Path == "crtfastmath.o") // Not found.
446 return false;
447
448 CmdArgs.push_back(Args.MakeArgString(Path));
449 return true;
450}