Lines Matching refs:CmdArgs
94 ArgStringList &CmdArgs,
115 CmdArgs.push_back(Args.MakeArgString(std::string(ArgName) + "."));
117 CmdArgs.push_back(ArgName);
118 CmdArgs.push_back(".");
122 CmdArgs.push_back(Args.MakeArgString(std::string(ArgName) + Dirs.substr(0, Delim)));
124 CmdArgs.push_back(ArgName);
125 CmdArgs.push_back(Args.MakeArgString(Dirs.substr(0, Delim)));
133 CmdArgs.push_back(Args.MakeArgString(std::string(ArgName) + "."));
135 CmdArgs.push_back(ArgName);
136 CmdArgs.push_back(".");
140 CmdArgs.push_back(Args.MakeArgString(std::string(ArgName) + Dirs));
142 CmdArgs.push_back(ArgName);
143 CmdArgs.push_back(Args.MakeArgString(Dirs));
150 ArgStringList &CmdArgs) {
155 Args.AddAllArgValues(CmdArgs, options::OPT_Zlinker_input);
173 CmdArgs.push_back(II.getFilename());
182 TC.AddCXXStdlibLibArgs(Args, CmdArgs);
184 TC.AddCCKextLibArgs(Args, CmdArgs);
186 A.renderAsInput(Args, CmdArgs);
190 addDirectoryList(Args, CmdArgs, "-L", "LIBRARY_PATH");
209 ArgStringList &CmdArgs,
224 CmdArgs.push_back(Args.MakeArgString(ProfileRT));
239 ArgStringList &CmdArgs,
246 Args.AddLastArg(CmdArgs, options::OPT_C);
247 Args.AddLastArg(CmdArgs, options::OPT_CC);
267 CmdArgs.push_back("-dependency-file");
268 CmdArgs.push_back(DepFile);
288 CmdArgs.push_back("-MT");
291 CmdArgs.push_back(Args.MakeArgString(Quoted));
296 CmdArgs.push_back("-sys-header-deps");
303 CmdArgs.push_back("-MG");
306 Args.AddLastArg(CmdArgs, options::OPT_MP);
316 CmdArgs.push_back("-MT");
319 CmdArgs.push_back(Args.MakeArgString(Quoted));
323 A->render(Args, CmdArgs);
374 CmdArgs.push_back("-include-pch");
376 CmdArgs.push_back("-include-pth");
377 CmdArgs.push_back(Args.MakeArgString(P.str()));
389 A->render(Args, CmdArgs);
392 Args.AddAllArgs(CmdArgs, options::OPT_D, options::OPT_U);
393 Args.AddAllArgs(CmdArgs, options::OPT_I_Group, options::OPT_F,
402 Args.AddAllArgValues(CmdArgs, options::OPT_Wp_COMMA,
414 CmdArgs.push_back("-isysroot");
415 CmdArgs.push_back(C.getArgs().MakeArgString(sysroot));
424 addDirectoryList(Args, CmdArgs, "-I", "CPATH");
426 addDirectoryList(Args, CmdArgs, "-c-isystem", "C_INCLUDE_PATH");
428 addDirectoryList(Args, CmdArgs, "-cxx-isystem", "CPLUS_INCLUDE_PATH");
430 addDirectoryList(Args, CmdArgs, "-objc-isystem", "OBJC_INCLUDE_PATH");
432 addDirectoryList(Args, CmdArgs, "-objcxx-isystem", "OBJCPLUS_INCLUDE_PATH");
436 getToolChain().AddClangCXXStdlibIncludeArgs(Args, CmdArgs);
439 getToolChain().AddClangSystemIncludeArgs(Args, CmdArgs);
564 ArgStringList &CmdArgs) {
570 CmdArgs.push_back("-target-feature");
571 CmdArgs.push_back("-vfp2");
572 CmdArgs.push_back("-target-feature");
573 CmdArgs.push_back("-vfp3");
574 CmdArgs.push_back("-target-feature");
575 CmdArgs.push_back("-neon");
577 CmdArgs.push_back("-target-feature");
578 CmdArgs.push_back("+vfp3");
579 CmdArgs.push_back("-target-feature");
580 CmdArgs.push_back("+d16");
581 CmdArgs.push_back("-target-feature");
582 CmdArgs.push_back("-neon");
584 CmdArgs.push_back("-target-feature");
585 CmdArgs.push_back("+vfp2");
586 CmdArgs.push_back("-target-feature");
587 CmdArgs.push_back("-neon");
589 CmdArgs.push_back("-target-feature");
590 CmdArgs.push_back("+vfp3");
591 CmdArgs.push_back("-target-feature");
592 CmdArgs.push_back("-neon");
594 CmdArgs.push_back("-target-feature");
595 CmdArgs.push_back("+v8fp");
597 CmdArgs.push_back("-target-feature");
598 CmdArgs.push_back("+v8fp");
599 CmdArgs.push_back("-target-feature");
600 CmdArgs.push_back("+neon");
602 CmdArgs.push_back("-target-feature");
603 CmdArgs.push_back("+neon");
610 ArgStringList &CmdArgs, StringRef CPU) {
615 CmdArgs.push_back("-target-feature");
616 CmdArgs.push_back("+neonfp");
625 CmdArgs.push_back("-target-feature");
626 CmdArgs.push_back("-neonfp");
715 ArgStringList &CmdArgs,
752 CmdArgs.push_back("-target-abi");
753 CmdArgs.push_back(ABIName);
756 CmdArgs.push_back("-target-cpu");
757 CmdArgs.push_back(Args.MakeArgString(CPUName));
765 CmdArgs.push_back("-msoft-float");
766 CmdArgs.push_back("-mfloat-abi");
767 CmdArgs.push_back("soft");
770 CmdArgs.push_back("-mfloat-abi");
771 CmdArgs.push_back("soft");
775 CmdArgs.push_back("-mfloat-abi");
776 CmdArgs.push_back("hard");
787 CmdArgs.push_back("-target-feature");
788 CmdArgs.push_back("+soft-float");
793 CmdArgs.push_back("-target-feature");
794 CmdArgs.push_back("+soft-float-abi");
799 addFPUArgs(D, A, Args, CmdArgs);
803 addFPMathArgs(D, A, Args, CmdArgs, getARMTargetCPU(Args, Triple));
808 CmdArgs.push_back("-target-feature");
809 CmdArgs.push_back("-neon");
815 CmdArgs.push_back("-backend-option");
816 CmdArgs.push_back("-arm-long-calls");
819 CmdArgs.push_back("-backend-option");
820 CmdArgs.push_back("-arm-strict-align");
823 CmdArgs.push_back("-backend-option");
824 CmdArgs.push_back("-arm-darwin-use-movt=0");
832 CmdArgs.push_back("-mno-global-merge");
838 CmdArgs.push_back("-no-implicit-float");
957 ArgStringList &CmdArgs,
962 CmdArgs.push_back("-target-feature");
964 CmdArgs.push_back(Args.MakeArgString("+" + FeatureName));
966 CmdArgs.push_back(Args.MakeArgString("-" + FeatureName));
971 ArgStringList &CmdArgs) const {
977 CmdArgs.push_back("-target-cpu");
978 CmdArgs.push_back(CPUName.data());
980 CmdArgs.push_back("-target-abi");
981 CmdArgs.push_back(ABIName.data());
989 CmdArgs.push_back("-msoft-float");
990 CmdArgs.push_back("-mfloat-abi");
991 CmdArgs.push_back("soft");
996 CmdArgs.push_back("-target-feature");
997 CmdArgs.push_back("+soft-float");
1000 CmdArgs.push_back("-mllvm");
1001 CmdArgs.push_back("-mips16-hard-float");
1007 CmdArgs.push_back("-mfloat-abi");
1008 CmdArgs.push_back("hard");
1011 AddTargetFeature(Args, CmdArgs,
1014 AddTargetFeature(Args, CmdArgs,
1017 AddTargetFeature(Args, CmdArgs,
1020 AddTargetFeature(Args, CmdArgs,
1023 AddTargetFeature(Args, CmdArgs,
1029 CmdArgs.push_back("-mllvm");
1030 CmdArgs.push_back("-mxgot");
1037 CmdArgs.push_back("-mllvm");
1038 CmdArgs.push_back("-mno-ldc1-sdc1");
1045 CmdArgs.push_back("-mllvm");
1046 CmdArgs.push_back("-mno-check-zero-division");
1052 CmdArgs.push_back("-mllvm");
1053 CmdArgs.push_back(Args.MakeArgString("-mips-ssection-threshold=" + v));
1121 ArgStringList &CmdArgs) const {
1138 CmdArgs.push_back("-target-cpu");
1139 CmdArgs.push_back(Args.MakeArgString(TargetCPUName.c_str()));
1143 AddTargetFeature(Args, CmdArgs,
1147 AddTargetFeature(Args, CmdArgs,
1152 AddTargetFeature(Args, CmdArgs,
1156 AddTargetFeature(Args, CmdArgs,
1163 CmdArgs.push_back("-target-feature");
1164 CmdArgs.push_back("-qpx");
1186 ArgStringList &CmdArgs) const {
1188 CmdArgs.push_back("-target-cpu");
1189 CmdArgs.push_back(Args.MakeArgString(TargetGPUName.c_str()));
1193 ArgStringList &CmdArgs) const {
1197 CmdArgs.push_back("-target-cpu");
1198 CmdArgs.push_back(A->getValue());
1222 CmdArgs.push_back("-msoft-float");
1223 CmdArgs.push_back("-target-feature");
1224 CmdArgs.push_back("+soft-float");
1227 CmdArgs.push_back("-mhard-float");
1238 ArgStringList &CmdArgs) const {
1240 CmdArgs.push_back("-target-cpu");
1241 CmdArgs.push_back(CPUName);
1296 ArgStringList &CmdArgs) const {
1302 CmdArgs.push_back("-disable-red-zone");
1317 CmdArgs.push_back("-no-implicit-float");
1320 CmdArgs.push_back("-target-cpu");
1321 CmdArgs.push_back(CPUName);
1353 CmdArgs.push_back("-target-feature");
1354 CmdArgs.push_back(Features[i]);
1382 ArgStringList &CmdArgs) const {
1385 CmdArgs.push_back("-target-cpu");
1386 CmdArgs.push_back(Args.MakeArgString(
1389 CmdArgs.push_back("-fno-signed-char");
1390 CmdArgs.push_back("-mqdsp6-compat");
1391 CmdArgs.push_back("-Wreturn-type");
1395 CmdArgs.push_back ("-mllvm");
1396 CmdArgs.push_back(Args.MakeArgString(
1401 CmdArgs.push_back("-fshort-enums");
1403 CmdArgs.push_back ("-mllvm");
1404 CmdArgs.push_back ("-enable-hexagon-ieee-rnd-near");
1406 CmdArgs.push_back ("-mllvm");
1407 CmdArgs.push_back ("-machine-sink-split=0");
1411 ArgStringList &CmdArgs) const {
1415 addFPUArgs(D, A, Args, CmdArgs);
1444 ArgStringList &CmdArgs) {
1486 CmdArgs.push_back("-fobjc-exceptions");
1506 CmdArgs.push_back("-fcxx-exceptions");
1513 CmdArgs.push_back("-fexceptions");
1586 ArgStringList &CmdArgs,
1589 CmdArgs.push_back("-mrelax-all");
1605 CmdArgs.push_back("-msave-temp-labels");
1607 CmdArgs.push_back("-mllvm");
1608 CmdArgs.push_back("-fatal-assembler-warnings");
1610 CmdArgs.push_back("-mnoexecstack");
1744 const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs) {
1758 CmdArgs.push_back(Args.MakeArgString(LibProfile));
1762 const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs,
1783 CmdArgs.insert(BeforeLibStdCXX ? CmdArgs.begin() : CmdArgs.end(),
1786 CmdArgs.push_back("-lpthread");
1787 CmdArgs.push_back("-lrt");
1788 CmdArgs.push_back("-ldl");
1795 CmdArgs.push_back(
1798 CmdArgs.push_back("-export-dynamic");
1805 ArgStringList &CmdArgs) {
1811 CmdArgs.insert(CmdArgs.begin(), Args.MakeArgString(LibAsan));
1814 addSanitizerRTLinkFlagsLinux(TC, Args, CmdArgs, "asan", true);
1821 ArgStringList &CmdArgs) {
1823 addSanitizerRTLinkFlagsLinux(TC, Args, CmdArgs, "tsan", true);
1829 ArgStringList &CmdArgs) {
1831 addSanitizerRTLinkFlagsLinux(TC, Args, CmdArgs, "msan", true);
1837 ArgStringList &CmdArgs) {
1839 addSanitizerRTLinkFlagsLinux(TC, Args, CmdArgs, "lsan", true);
1845 ArgStringList &CmdArgs, bool IsCXX,
1853 addSanitizerRTLinkFlagsLinux(TC, Args, CmdArgs, "san", true, false);
1855 addSanitizerRTLinkFlagsLinux(TC, Args, CmdArgs, "ubsan", false);
1860 addSanitizerRTLinkFlagsLinux(TC, Args, CmdArgs, "ubsan_cxx", false);
1903 static void addDebugCompDirArg(const ArgList &Args, ArgStringList &CmdArgs) {
1913 CmdArgs.push_back("-fdebug-compilation-dir");
1914 CmdArgs.push_back(Args.MakeArgString(pwd));
1921 CmdArgs.push_back("-fdebug-compilation-dir");
1922 CmdArgs.push_back(Args.MakeArgString(cwd));
1983 ArgStringList CmdArgs;
1990 CmdArgs.push_back("-cc1");
1993 CmdArgs.push_back("-triple");
1995 CmdArgs.push_back(Args.MakeArgString(TripleStr));
2002 CmdArgs.push_back("-analyze");
2004 CmdArgs.push_back("-migrate");
2007 CmdArgs.push_back("-Eonly");
2009 CmdArgs.push_back("-E");
2012 CmdArgs.push_back("-P");
2015 CmdArgs.push_back("-emit-obj");
2017 CollectArgsForIntegratedAssembler(C, Args, CmdArgs, D);
2026 CmdArgs.push_back("-fsyntax-only");
2028 CmdArgs.push_back("-emit-pch");
2030 CmdArgs.push_back("-emit-pth");
2035 CmdArgs.push_back("-fsyntax-only");
2038 CmdArgs.push_back("-emit-llvm");
2041 CmdArgs.push_back("-emit-llvm-bc");
2043 CmdArgs.push_back("-S");
2045 CmdArgs.push_back("-emit-pch");
2047 CmdArgs.push_back("-module-file-info");
2049 CmdArgs.push_back("-rewrite-objc");
2052 CmdArgs.push_back("-rewrite-objc");
2061 CmdArgs.push_back("-disable-free");
2065 CmdArgs.push_back("-disable-llvm-verifier");
2070 CmdArgs.push_back("-main-file-name");
2071 CmdArgs.push_back(getBaseInputName(Args, Inputs));
2076 CmdArgs.push_back("-static-define");
2080 CmdArgs.push_back("-analyzer-store=region");
2083 CmdArgs.push_back("-analyzer-opt-analyze-nested-blocks");
2085 CmdArgs.push_back("-analyzer-eagerly-assume");
2089 CmdArgs.push_back("-analyzer-checker=core");
2092 CmdArgs.push_back("-analyzer-checker=unix");
2095 CmdArgs.push_back("-analyzer-checker=osx");
2097 CmdArgs.push_back("-analyzer-checker=deadcode");
2100 CmdArgs.push_back("-analyzer-checker=cplusplus");
2103 CmdArgs.push_back("-analyzer-checker=security.insecureAPI.UncheckedReturn");
2104 CmdArgs.push_back("-analyzer-checker=security.insecureAPI.getpw");
2105 CmdArgs.push_back("-analyzer-checker=security.insecureAPI.gets");
2106 CmdArgs.push_back("-analyzer-checker=security.insecureAPI.mktemp");
2107 CmdArgs.push_back("-analyzer-checker=security.insecureAPI.mkstemp");
2108 CmdArgs.push_back("-analyzer-checker=security.insecureAPI.vfork");
2113 CmdArgs.push_back("-analyzer-output");
2115 CmdArgs.push_back(A->getValue());
2117 CmdArgs.push_back("plist");
2122 CmdArgs.push_back("-w");
2125 Args.AddAllArgValues(CmdArgs, options::OPT_Xanalyzer);
2190 CmdArgs.push_back("-mrelocation-model");
2191 CmdArgs.push_back("dynamic-no-pic");
2197 CmdArgs.push_back("-pic-level");
2198 CmdArgs.push_back("2");
2203 CmdArgs.push_back("-mrelocation-model");
2204 CmdArgs.push_back(PIC ? "pic" : "static");
2207 CmdArgs.push_back("-pic-level");
2208 CmdArgs.push_back(IsPICLevelTwo ? "2" : "1");
2210 CmdArgs.push_back("-pie-level");
2211 CmdArgs.push_back(IsPICLevelTwo ? "2" : "1");
2218 CmdArgs.push_back("-fno-merge-all-constants");
2223 CmdArgs.push_back("-mregparm");
2224 CmdArgs.push_back(A->getValue());
2233 CmdArgs.push_back("-fpcc-struct-return");
2236 CmdArgs.push_back("-freg-struct-return");
2241 CmdArgs.push_back("-mrtd");
2244 CmdArgs.push_back("-mdisable-fp-elim");
2247 CmdArgs.push_back("-mno-zero-initialized-in-bss");
2257 CmdArgs.push_back("-relaxed-aliasing");
2259 CmdArgs.push_back("-struct-path-tbaa");
2262 CmdArgs.push_back("-fstrict-enums");
2265 CmdArgs.push_back("-mdisable-tail-calls");
2269 CmdArgs.push_back("-split-stacks");
2290 CmdArgs.push_back("-menable-no-infs");
2300 CmdArgs.push_back("-menable-no-nans");
2319 CmdArgs.push_back("-fmath-errno");
2371 CmdArgs.push_back("-menable-unsafe-fp-math");
2381 CmdArgs.push_back(Args.MakeArgString("-ffp-contract=" + Val));
2389 CmdArgs.push_back(Args.MakeArgString("-ffp-contract=fast"));
2401 CmdArgs.push_back("-ffast-math");
2404 CmdArgs.push_back("-ffinite-math-only");
2412 CmdArgs.push_back("-masm-verbose");
2415 CmdArgs.push_back("-mdebug-pass");
2416 CmdArgs.push_back("Structure");
2419 CmdArgs.push_back("-mdebug-pass");
2420 CmdArgs.push_back("Arguments");
2426 CmdArgs.push_back("-mconstructor-aliases");
2431 CmdArgs.push_back("-fforbid-guard-variables");
2434 CmdArgs.push_back("-mms-bitfields");
2447 CmdArgs.push_back("-munwind-tables");
2449 getToolChain().addClangTargetOptions(Args, CmdArgs);
2452 CmdArgs.push_back("-mlimit-float-precision");
2453 CmdArgs.push_back(A->getValue());
2460 CmdArgs.push_back("-mcode-model");
2461 CmdArgs.push_back(A->getValue());
2471 AddARMTargetArgs(Args, CmdArgs, KernelOrKext);
2478 AddMIPSTargetArgs(Args, CmdArgs);
2484 AddPPCTargetArgs(Args, CmdArgs);
2488 AddR600TargetArgs(Args, CmdArgs);
2492 AddSparcTargetArgs(Args, CmdArgs);
2496 AddSystemZTargetArgs(Args, CmdArgs);
2501 AddX86TargetArgs(Args, CmdArgs);
2505 AddHexagonTargetArgs(Args, CmdArgs);
2509 AddAArch64TargetArgs(Args, CmdArgs);
2515 CmdArgs.push_back("-target-linker-version");
2516 CmdArgs.push_back(A->getValue());
2520 CmdArgs.push_back("-momit-leaf-frame-pointer");
2537 Args.AddAllArgs(CmdArgs, options::OPT_v);
2538 Args.AddLastArg(CmdArgs, options::OPT_H);
2540 CmdArgs.push_back("-header-include-file");
2541 CmdArgs.push_back(D.CCPrintHeadersFilename ?
2544 Args.AddLastArg(CmdArgs, options::OPT_P);
2545 Args.AddLastArg(CmdArgs, options::OPT_print_ivar_layout);
2548 CmdArgs.push_back("-diagnostic-log-file");
2549 CmdArgs.push_back(D.CCLogDiagnosticsFilename ?
2558 CmdArgs.push_back("-gline-tables-only");
2560 CmdArgs.push_back("-gdwarf-2");
2562 CmdArgs.push_back("-gdwarf-3");
2564 CmdArgs.push_back("-gdwarf-4");
2569 CmdArgs.push_back("-gdwarf-2");
2571 CmdArgs.push_back("-g");
2578 CmdArgs.push_back("-dwarf-column-info");
2585 CmdArgs.push_back("-g");
2586 CmdArgs.push_back("-backend-option");
2587 CmdArgs.push_back("-split-dwarf=Enable");
2591 Args.AddAllArgs(CmdArgs, options::OPT_fdebug_types_section);
2593 Args.AddAllArgs(CmdArgs, options::OPT_ffunction_sections);
2594 Args.AddAllArgs(CmdArgs, options::OPT_fdata_sections);
2596 Args.AddAllArgs(CmdArgs, options::OPT_finstrument_functions);
2600 CmdArgs.push_back("-femit-coverage-notes");
2603 CmdArgs.push_back("-femit-coverage-data");
2608 CmdArgs.push_back("-coverage-file");
2619 CmdArgs.push_back(Args.MakeArgString(CoverageFilename));
2625 CmdArgs.push_back("-nostdsysteminc");
2626 CmdArgs.push_back("-nobuiltininc");
2629 CmdArgs.push_back("-nostdsysteminc");
2630 Args.AddLastArg(CmdArgs, options::OPT_nostdincxx);
2631 Args.AddLastArg(CmdArgs, options::OPT_nobuiltininc);
2635 CmdArgs.push_back("-resource-dir");
2636 CmdArgs.push_back(D.ResourceDir.c_str());
2638 Args.AddLastArg(CmdArgs, options::OPT_working_directory);
2650 CmdArgs.push_back("-arcmt-check");
2653 CmdArgs.push_back("-arcmt-modify");
2656 CmdArgs.push_back("-arcmt-migrate");
2657 CmdArgs.push_back("-mt-migrate-directory");
2658 CmdArgs.push_back(A->getValue());
2660 Args.AddLastArg(CmdArgs, options::OPT_arcmt_migrate_report_output);
2661 Args.AddLastArg(CmdArgs, options::OPT_arcmt_migrate_emit_arc_errors);
2676 CmdArgs.push_back("-mt-migrate-directory");
2677 CmdArgs.push_back(A->getValue());
2683 CmdArgs.push_back("-objcmt-migrate-literals");
2684 CmdArgs.push_back("-objcmt-migrate-subscripting");
2685 CmdArgs.push_back("-objcmt-migrate-property");
2687 Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_literals);
2688 Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_subscripting);
2689 Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_property);
2698 AddPreprocessingOptions(C, JA, D, Args, CmdArgs, Output, Inputs);
2709 CmdArgs.push_back("-O3");
2711 A->render(Args, CmdArgs);
2718 Args.AddAllArgs(CmdArgs, options::OPT_W_Group);
2720 CmdArgs.push_back("-pedantic");
2721 Args.AddLastArg(CmdArgs, options::OPT_pedantic_errors);
2722 Args.AddLastArg(CmdArgs, options::OPT_w);
2732 CmdArgs.push_back("-std=c++98");
2734 CmdArgs.push_back("-std=c89");
2736 Std->render(Args, CmdArgs);
2741 A->render(Args, CmdArgs);
2750 Args.AddAllArgsTranslated(CmdArgs, options::OPT_std_default_EQ,
2753 CmdArgs.push_back("-std=c++11");
2755 Args.AddLastArg(CmdArgs, options::OPT_trigraphs);
2764 CmdArgs.push_back("-fconst-strings");
2773 CmdArgs.push_back("-fdeprecated-macro");
2779 CmdArgs.push_back("-fgnu-keywords");
2781 CmdArgs.push_back("-fno-gnu-keywords");
2785 CmdArgs.push_back("-fno-dwarf2-cfi-asm");
2788 CmdArgs.push_back("-fno-dwarf-directory-asm");
2791 CmdArgs.push_back("-fno-autolink");
2794 addDebugCompDirArg(Args, CmdArgs);
2798 CmdArgs.push_back("-ftemplate-depth");
2799 CmdArgs.push_back(A->getValue());
2803 CmdArgs.push_back("-fconstexpr-depth");
2804 CmdArgs.push_back(A->getValue());
2808 CmdArgs.push_back("-fconstexpr-steps");
2809 CmdArgs.push_back(A->getValue());
2813 CmdArgs.push_back("-fbracket-depth");
2814 CmdArgs.push_back(A->getValue());
2821 CmdArgs.push_back(Args.MakeArgString("-Wlarge-by-value-copy=" + bytes));
2823 CmdArgs.push_back("-Wlarge-by-value-copy=64"); // default value
2828 CmdArgs.push_back("-relocatable-pch");
2831 CmdArgs.push_back("-fconstant-string-class");
2832 CmdArgs.push_back(A->getValue());
2836 CmdArgs.push_back("-ftabstop");
2837 CmdArgs.push_back(A->getValue());
2840 CmdArgs.push_back("-ferror-limit");
2842 CmdArgs.push_back(A->getValue());
2844 CmdArgs.push_back("19");
2847 CmdArgs.push_back("-fmacro-backtrace-limit");
2848 CmdArgs.push_back(A->getValue());
2852 CmdArgs.push_back("-ftemplate-backtrace-limit");
2853 CmdArgs.push_back(A->getValue());
2857 CmdArgs.push_back("-fconstexpr-backtrace-limit");
2858 CmdArgs.push_back(A->getValue());
2862 CmdArgs.push_back("-fmessage-length");
2864 CmdArgs.push_back(A->getValue());
2869 CmdArgs.push_back(Args.MakeArgString(Twine(N)));
2876 CmdArgs.push_back("-fvisibility");
2877 CmdArgs.push_back(A->getValue());
2880 CmdArgs.push_back("-fvisibility");
2881 CmdArgs.push_back("hidden");
2882 CmdArgs.push_back("-ftype-visibility");
2883 CmdArgs.push_back("default");
2887 Args.AddLastArg(CmdArgs, options::OPT_fvisibility_inlines_hidden);
2889 Args.AddLastArg(CmdArgs, options::OPT_ftlsmodel_EQ);
2894 CmdArgs.push_back("-ffreestanding");
2897 Args.AddLastArg(CmdArgs, options::OPT_femit_all_decls);
2898 Args.AddLastArg(CmdArgs, options::OPT_fheinous_gnu_extensions);
2899 Args.AddLastArg(CmdArgs, options::OPT_flimit_debug_info);
2900 Args.AddLastArg(CmdArgs, options::OPT_fno_limit_debug_info);
2901 Args.AddLastArg(CmdArgs, options::OPT_fno_operator_names);
2905 Args.AddLastArg(CmdArgs, options::OPT_faltivec);
2906 Args.AddLastArg(CmdArgs, options::OPT_fdiagnostics_show_template_tree);
2907 Args.AddLastArg(CmdArgs, options::OPT_fno_elide_type);
2910 Sanitize.addArgs(Args, CmdArgs);
2915 CmdArgs.push_back("-fno-sanitize-recover");
2920 CmdArgs.push_back("-fsanitize-undefined-trap-on-error");
2931 Args.AddLastArg(CmdArgs, options::OPT_pg);
2936 CmdArgs.push_back("-fno-lax-vector-conversions");
2939 CmdArgs.push_back("-fapple-kext");
2943 CmdArgs.push_back("-frewrite-includes");
2945 Args.AddLastArg(CmdArgs, options::OPT_fobjc_sender_dependent_dispatch);
2946 Args.AddLastArg(CmdArgs, options::OPT_fdiagnostics_print_source_range_info);
2947 Args.AddLastArg(CmdArgs, options::OPT_fdiagnostics_parseable_fixits);
2948 Args.AddLastArg(CmdArgs, options::OPT_ftime_report);
2949 Args.AddLastArg(CmdArgs, options::OPT_ftrapv);
2952 CmdArgs.push_back("-ftrapv-handler");
2953 CmdArgs.push_back(A->getValue());
2956 Args.AddLastArg(CmdArgs, options::OPT_ftrap_function_EQ);
2963 CmdArgs.push_back("-fwrapv");
2967 CmdArgs.push_back("-fwrapv");
2969 Args.AddLastArg(CmdArgs, options::OPT_fwritable_strings);
2970 Args.AddLastArg(CmdArgs, options::OPT_funroll_loops);
2972 Args.AddLastArg(CmdArgs, options::OPT_pthread);
2989 CmdArgs.push_back("-stack-protector");
2990 CmdArgs.push_back(Args.MakeArgString(Twine(StackProtectorLevel)));
2999 CmdArgs.push_back("-stack-protector-buffer-size");
3001 CmdArgs.push_back(Args.MakeArgString(Str.drop_front(16)));
3010 CmdArgs.push_back("-backend-option");
3011 CmdArgs.push_back("-force-align-stack");
3015 CmdArgs.push_back(Args.MakeArgString("-mstackrealign"));
3020 CmdArgs.push_back(Args.MakeArgString("-mstack-alignment=" + alignment));
3024 CmdArgs.push_back("-backend-option");
3025 CmdArgs.push_back("-arm-strict-align");
3033 CmdArgs.push_back("-fapple-kext");
3035 CmdArgs.push_back("-fno-builtin");
3040 CmdArgs.push_back("-fno-builtin");
3044 CmdArgs.push_back("-fno-assume-sane-operator-new");
3052 CmdArgs.push_back("-fblocks");
3056 CmdArgs.push_back("-fblocks-runtime-optional");
3068 CmdArgs.push_back("-fmodules");
3077 CmdArgs.push_back("-fmodule-maps");
3085 A->render(Args, CmdArgs);
3096 CmdArgs.push_back(Args.MakeArgString(DefaultModuleCache));
3100 Args.AddAllArgs(CmdArgs, options::OPT_fmodules_ignore_macro);
3101 Args.AddLastArg(CmdArgs, options::OPT_fmodules_prune_interval);
3102 Args.AddLastArg(CmdArgs, options::OPT_fmodules_prune_after);
3108 CmdArgs.push_back("-fno-access-control");
3114 CmdArgs.push_back("-fno-elide-constructors");
3119 CmdArgs.push_back("-fno-rtti");
3137 CmdArgs.push_back("-fshort-enums");
3142 CmdArgs.push_back("-fno-signed-char");
3147 CmdArgs.push_back("-fno-threadsafe-statics");
3156 CmdArgs.push_back("-fno-use-cxa-atexit");
3161 CmdArgs.push_back("-fms-extensions");
3170 CmdArgs.push_back("-fms-compatibility");
3178 CmdArgs.push_back("-fmsc-version=1300");
3180 CmdArgs.push_back(Args.MakeArgString("-fmsc-version=" + msc_ver));
3187 CmdArgs.push_back("-fborland-extensions");
3194 CmdArgs.push_back("-fdelayed-template-parsing");
3200 A->render(Args, CmdArgs);
3205 CmdArgs.push_back("-fgnu89-inline");
3208 CmdArgs.push_back("-fno-inline");
3211 CmdArgs.push_back("-fno-inline-functions");
3213 ObjCRuntime objcRuntime = AddObjCRuntimeArgs(Args, CmdArgs, rewriteKind);
3223 CmdArgs.push_back("-fobjc-dispatch-method=mixed");
3225 CmdArgs.push_back("-fobjc-dispatch-method=non-legacy");
3232 CmdArgs.push_back("-fobjc-default-synthesize-properties");
3237 CmdArgs.push_back("-fencode-extended-block-signature");
3246 CmdArgs.push_back("-fobjc-arc");
3253 CmdArgs.push_back("-fobjc-arc-cxxlib=libc++");
3255 CmdArgs.push_back("-fobjc-arc-cxxlib=libstdc++");
3263 CmdArgs.push_back("-fobjc-arc-exceptions");
3269 CmdArgs.push_back("-fno-objc-infer-related-result-type");
3281 GCArg->render(Args, CmdArgs);
3291 KernelOrKext, objcRuntime, CmdArgs);
3294 CmdArgs.push_back("-fsjlj-exceptions");
3299 CmdArgs.push_back("-fno-assume-sane-operator-new");
3307 CmdArgs.push_back("-fno-constant-cfstrings");
3312 A->render(Args, CmdArgs);
3318 CmdArgs.push_back("-fpascal-strings");
3325 CmdArgs.push_back(Args.MakeArgString(PackStructStr));
3328 CmdArgs.push_back("-fpack-struct=1");
3333 CmdArgs.push_back("-fno-common");
3339 CmdArgs.push_back("-fno-common");
3357 CmdArgs.push_back("-fno-caret-diagnostics");
3362 CmdArgs.push_back("-fno-diagnostics-fixit-info");
3367 CmdArgs.push_back("-fdiagnostics-show-option");
3371 CmdArgs.push_back("-fdiagnostics-show-category");
3372 CmdArgs.push_back(A->getValue());
3377 CmdArgs.push_back("-fdiagnostics-format");
3378 CmdArgs.push_back(A->getValue());
3386 CmdArgs.push_back("-fdiagnostics-show-note-include-stack");
3388 CmdArgs.push_back("-fno-diagnostics-show-note-include-stack");
3429 CmdArgs.push_back("-fcolor-diagnostics");
3433 CmdArgs.push_back("-fno-show-source-location");
3438 CmdArgs.push_back("-fno-show-column");
3442 CmdArgs.push_back("-fno-spell-checking");
3448 CmdArgs.push_back("-fasm-blocks");
3458 CmdArgs.push_back("-vectorize-loops");
3463 CmdArgs.push_back("-vectorize-slp");
3468 CmdArgs.push_back("-vectorize-slp-aggressive");
3471 A->render(Args, CmdArgs);
3478 CmdArgs.push_back("-fdollars-in-identifiers");
3480 CmdArgs.push_back("-fno-dollars-in-identifiers");
3493 CmdArgs.push_back("-fapple-pragma-pack");
3499 CmdArgs.push_back("-fno-math-builtin");
3510 CmdArgs.push_back("-fno-builtin-strcat");
3512 CmdArgs.push_back("-fno-builtin-strcpy");
3520 CmdArgs.push_back("-traditional-cpp");
3525 Args.AddLastArg(CmdArgs, options::OPT_dM);
3526 Args.AddLastArg(CmdArgs, options::OPT_dD);
3530 CmdArgs.push_back("-serialize-diagnostic-file");
3531 CmdArgs.push_back(Args.MakeArgString(A->getValue()));
3535 CmdArgs.push_back("-fretain-comments-from-system-headers");
3538 Args.AddAllArgs(CmdArgs, options::OPT_fcomment_block_commands);
3540 Args.AddAllArgs(CmdArgs, options::OPT_fparse_all_comments);
3544 Args.AddAllArgValues(CmdArgs, options::OPT_Xclang);
3552 CmdArgs.push_back("-disable-llvm-optzns");
3554 (*it)->render(Args, CmdArgs);
3560 CmdArgs.push_back("-o");
3561 CmdArgs.push_back(Output.getFilename());
3569 CmdArgs.push_back("-x");
3571 CmdArgs.push_back(types::getTypeName(types::TY_PP_ObjCXX));
3573 CmdArgs.push_back(types::getTypeName(II.getType()));
3575 CmdArgs.push_back(II.getFilename());
3577 II.getInputArg().renderAsInput(Args, CmdArgs);
3580 Args.AddAllArgs(CmdArgs, options::OPT_undef);
3598 CmdArgs.push_back("-dwarf-debug-flags");
3599 CmdArgs.push_back(Args.MakeArgString(Flags.str()));
3609 CmdArgs.push_back("-split-dwarf-file");
3611 CmdArgs.push_back(SplitDwarfOut);
3615 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
3649 ArgStringList &CmdArgs) const {
3654 CmdArgs.push_back("-target-cpu");
3655 CmdArgs.push_back(Args.MakeArgString(getARMTargetCPU(Args, Triple)));
3659 addFPUArgs(D, A, Args, CmdArgs);
3663 addFPMathArgs(D, A, Args, CmdArgs, getARMTargetCPU(Args, Triple));
3667 ArgStringList &CmdArgs) const {
3670 CmdArgs.push_back("-target-cpu");
3671 CmdArgs.push_back(CPUName);
3679 ArgStringList &cmdArgs,
3697 runtimeArg->render(args, cmdArgs);
3795 cmdArgs.push_back(args.MakeArgString(
3805 ArgStringList CmdArgs;
3820 CmdArgs.push_back("-cc1as");
3823 CmdArgs.push_back("-triple");
3826 CmdArgs.push_back(Args.MakeArgString(TripleStr));
3830 CmdArgs.push_back("-filetype");
3831 CmdArgs.push_back("obj");
3835 CmdArgs.push_back("-main-file-name");
3836 CmdArgs.push_back(Clang::getBaseInputName(Args, Inputs));
3845 AddARMTargetArgs(Args, CmdArgs);
3850 AddX86TargetArgs(Args, CmdArgs);
3871 CmdArgs.push_back("-g");
3874 addDebugCompDirArg(Args, CmdArgs);
3878 CmdArgs.push_back("-dwarf-debug-producer");
3879 CmdArgs.push_back(Args.MakeArgString(getClangFullVersion()));
3897 CmdArgs.push_back("-dwarf-debug-flags");
3898 CmdArgs.push_back(Args.MakeArgString(Flags.str()));
3903 CollectArgsForIntegratedAssembler(C, Args, CmdArgs,
3906 Args.AddAllArgs(CmdArgs, options::OPT_mllvm);
3909 CmdArgs.push_back("-o");
3910 CmdArgs.push_back(Output.getFilename());
3913 CmdArgs.push_back(Input.getFilename());
3916 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
3933 ArgStringList CmdArgs;
3949 A->render(Args, CmdArgs);
3953 RenderExtraToolArgs(JA, CmdArgs);
3958 CmdArgs.push_back("-arch");
3962 CmdArgs.push_back("ppc");
3964 CmdArgs.push_back("ppc64");
3966 CmdArgs.push_back("ppc64le");
3968 CmdArgs.push_back(Args.MakeArgString(getToolChain().getArchName()));
3977 CmdArgs.push_back("-m32");
3980 CmdArgs.push_back("-m64");
3983 CmdArgs.push_back("-o");
3984 CmdArgs.push_back(Output.getFilename());
3987 CmdArgs.push_back("-fsyntax-only");
3990 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA,
4018 CmdArgs.push_back("-x");
4019 CmdArgs.push_back(types::getTypeName(II.getType()));
4023 CmdArgs.push_back(II.getFilename());
4029 CmdArgs.push_back("-lstdc++");
4034 A.render(Args, CmdArgs);
4049 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
4053 ArgStringList &CmdArgs) const {
4054 CmdArgs.push_back("-E");
4058 ArgStringList &CmdArgs) const {
4063 ArgStringList &CmdArgs) const {
4069 CmdArgs.push_back("-c");
4075 CmdArgs.push_back("-S");
4080 ArgStringList &CmdArgs) const {
4081 CmdArgs.push_back("-c");
4085 ArgStringList &CmdArgs) const {
4091 ArgStringList &CmdArgs) const {
4101 ArgStringList CmdArgs;
4105 CmdArgs.push_back(Args.MakeArgString(MarchString));
4107 RenderExtraToolArgs(JA, CmdArgs);
4110 CmdArgs.push_back("-o");
4111 CmdArgs.push_back(Output.getFilename());
4114 CmdArgs.push_back("-fsyntax-only");
4119 CmdArgs.push_back(
4122 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA,
4150 CmdArgs.push_back(II.getFilename());
4153 II.getInputArg().render(Args, CmdArgs);
4159 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
4163 ArgStringList &CmdArgs) const {
4177 ArgStringList CmdArgs;
4206 CmdArgs.push_back(i->c_str());
4209 CmdArgs.push_back(Args.MakeArgString("-m" + MarchString));
4212 CmdArgs.push_back("-shared");
4213 CmdArgs.push_back("-call_shared"); // should be the default, but doing as
4218 CmdArgs.push_back("-static");
4221 CmdArgs.push_back("-pie");
4225 CmdArgs.push_back(
4232 CmdArgs.push_back("-o");
4233 CmdArgs.push_back(Output.getFilename());
4269 CmdArgs.push_back(
4272 CmdArgs.push_back(Args.MakeArgString(StartFilesDir + "/crt0.o"));
4275 CmdArgs.push_back(Args.MakeArgString(StartFilesDir + initObj));
4287 CmdArgs.push_back(Args.MakeArgString(StringRef("-L") + *i));
4292 Args.AddAllArgs(CmdArgs, options::OPT_T_Group);
4293 Args.AddAllArgs(CmdArgs, options::OPT_e);
4294 Args.AddAllArgs(CmdArgs, options::OPT_s);
4295 Args.AddAllArgs(CmdArgs, options::OPT_t);
4296 Args.AddAllArgs(CmdArgs, options::OPT_u_Group);
4298 AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs);
4305 ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs);
4306 CmdArgs.push_back("-lm");
4309 CmdArgs.push_back("--start-group");
4314 CmdArgs.push_back(Args.MakeArgString("-l" + *i));
4315 CmdArgs.push_back("-lc");
4317 CmdArgs.push_back("-lgcc");
4319 CmdArgs.push_back("--end-group");
4327 CmdArgs.push_back(Args.MakeArgString(StartFilesDir + finiObj));
4334 Args.MakeArgString(Linker), CmdArgs));
4406 ArgStringList CmdArgs;
4422 CmdArgs.push_back("--gstabs");
4424 CmdArgs.push_back("-g");
4428 AddDarwinArch(Args, CmdArgs);
4434 CmdArgs.push_back("-force_cpusubtype_ALL");
4442 CmdArgs.push_back("-static");
4444 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA,
4448 CmdArgs.push_back("-o");
4449 CmdArgs.push_back(Output.getFilename());
4452 CmdArgs.push_back(Input.getFilename());
4458 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
4464 ArgStringList &CmdArgs) const {
4468 CmdArgs.push_back("-arch");
4469 CmdArgs.push_back(Args.MakeArgString(ArchName));
4473 CmdArgs.push_back("-force_cpusubtype_ALL");
4490 ArgStringList &CmdArgs,
4524 CmdArgs.push_back("-demangle");
4528 CmdArgs.push_back("-export_dynamic");
4537 CmdArgs.push_back("-object_path_lto");
4538 CmdArgs.push_back(TmpPath);
4542 Args.AddAllArgs(CmdArgs, options::OPT_static);
4544 CmdArgs.push_back("-dynamic");
4551 AddDarwinArch(Args, CmdArgs);
4553 Args.AddLastArg(CmdArgs, options::OPT_force__cpusubtype__ALL);
4555 Args.AddLastArg(CmdArgs, options::OPT_bundle);
4556 Args.AddAllArgs(CmdArgs, options::OPT_bundle__loader);
4557 Args.AddAllArgs(CmdArgs, options::OPT_client__name);
4566 Args.AddLastArg(CmdArgs, options::OPT_force__flat__namespace);
4567 Args.AddLastArg(CmdArgs, options::OPT_keep__private__externs);
4568 Args.AddLastArg(CmdArgs, options::OPT_private__bundle);
4570 CmdArgs.push_back("-dylib");
4582 Args.AddAllArgsTranslated(CmdArgs, options::OPT_compatibility__version,
4584 Args.AddAllArgsTranslated(CmdArgs, options::OPT_current__version,
4587 AddDarwinArch(Args, CmdArgs);
4589 Args.AddAllArgsTranslated(CmdArgs, options::OPT_install__name,
4593 Args.AddLastArg(CmdArgs, options::OPT_all__load);
4594 Args.AddAllArgs(CmdArgs, options::OPT_allowable__client);
4595 Args.AddLastArg(CmdArgs, options::OPT_bind__at__load);
4597 Args.AddLastArg(CmdArgs, options::OPT_arch__errors__fatal);
4598 Args.AddLastArg(CmdArgs, options::OPT_dead__strip);
4599 Args.AddLastArg(CmdArgs, options::OPT_no__dead__strip__inits__and__terms);
4600 Args.AddAllArgs(CmdArgs, options::OPT_dylib__file);
4601 Args.AddLastArg(CmdArgs, options::OPT_dynamic);
4602 Args.AddAllArgs(CmdArgs, options::OPT_exported__symbols__list);
4603 Args.AddLastArg(CmdArgs, options::OPT_flat__namespace);
4604 Args.AddAllArgs(CmdArgs, options::OPT_force__load);
4605 Args.AddAllArgs(CmdArgs, options::OPT_headerpad__max__install__names);
4606 Args.AddAllArgs(CmdArgs, options::OPT_image__base);
4607 Args.AddAllArgs(CmdArgs, options::OPT_init);
4620 CmdArgs.push_back("-ios_simulator_version_min");
4622 CmdArgs.push_back("-iphoneos_version_min");
4624 CmdArgs.push_back("-macosx_version_min");
4625 CmdArgs.push_back(Args.MakeArgString(TargetVersion.getAsString()));
4627 Args.AddLastArg(CmdArgs, options::OPT_nomultidefs);
4628 Args.AddLastArg(CmdArgs, options::OPT_multi__module);
4629 Args.AddLastArg(CmdArgs, options::OPT_single__module);
4630 Args.AddAllArgs(CmdArgs, options::OPT_multiply__defined);
4631 Args.AddAllArgs(CmdArgs, options::OPT_multiply__defined__unused);
4638 CmdArgs.push_back("-pie");
4640 CmdArgs.push_back("-no_pie");
4643 Args.AddLastArg(CmdArgs, options::OPT_prebind);
4644 Args.AddLastArg(CmdArgs, options::OPT_noprebind);
4645 Args.AddLastArg(CmdArgs, options::OPT_nofixprebinding);
4646 Args.AddLastArg(CmdArgs, options::OPT_prebind__all__twolevel__modules);
4647 Args.AddLastArg(CmdArgs, options::OPT_read__only__relocs);
4648 Args.AddAllArgs(CmdArgs, options::OPT_sectcreate);
4649 Args.AddAllArgs(CmdArgs, options::OPT_sectorder);
4650 Args.AddAllArgs(CmdArgs, options::OPT_seg1addr);
4651 Args.AddAllArgs(CmdArgs, options::OPT_segprot);
4652 Args.AddAllArgs(CmdArgs, options::OPT_segaddr);
4653 Args.AddAllArgs(CmdArgs, options::OPT_segs__read__only__addr);
4654 Args.AddAllArgs(CmdArgs, options::OPT_segs__read__write__addr);
4655 Args.AddAllArgs(CmdArgs, options::OPT_seg__addr__table);
4656 Args.AddAllArgs(CmdArgs, options::OPT_seg__addr__table__filename);
4657 Args.AddAllArgs(CmdArgs, options::OPT_sub__library);
4658 Args.AddAllArgs(CmdArgs, options::OPT_sub__umbrella);
4664 CmdArgs.push_back("-syslibroot");
4665 CmdArgs.push_back(C.getArgs().MakeArgString(sysroot));
4667 CmdArgs.push_back("-syslibroot");
4668 CmdArgs.push_back(A->getValue());
4671 Args.AddLastArg(CmdArgs, options::OPT_twolevel__namespace);
4672 Args.AddLastArg(CmdArgs, options::OPT_twolevel__namespace__hints);
4673 Args.AddAllArgs(CmdArgs, options::OPT_umbrella);
4674 Args.AddAllArgs(CmdArgs, options::OPT_undefined);
4675 Args.AddAllArgs(CmdArgs, options::OPT_unexported__symbols__list);
4676 Args.AddAllArgs(CmdArgs, options::OPT_weak__reference__mismatches);
4677 Args.AddLastArg(CmdArgs, options::OPT_X_Flag);
4678 Args.AddAllArgs(CmdArgs, options::OPT_y);
4679 Args.AddLastArg(CmdArgs, options::OPT_w);
4680 Args.AddAllArgs(CmdArgs, options::OPT_pagezero__size);
4681 Args.AddAllArgs(CmdArgs, options::OPT_segs__read__);
4682 Args.AddLastArg(CmdArgs, options::OPT_seglinkedit);
4683 Args.AddLastArg(CmdArgs, options::OPT_noseglinkedit);
4684 Args.AddAllArgs(CmdArgs, options::OPT_sectalign);
4685 Args.AddAllArgs(CmdArgs, options::OPT_sectobjectsymbols);
4686 Args.AddAllArgs(CmdArgs, options::OPT_segcreate);
4687 Args.AddLastArg(CmdArgs, options::OPT_whyload);
4688 Args.AddLastArg(CmdArgs, options::OPT_whatsloaded);
4689 Args.AddAllArgs(CmdArgs, options::OPT_dylinker__install__name);
4690 Args.AddLastArg(CmdArgs, options::OPT_dylinker);
4691 Args.AddLastArg(CmdArgs, options::OPT_Mach);
4704 ArgStringList CmdArgs;
4713 CmdArgs.push_back(Output.getFilename());
4714 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
4720 AddLinkArgs(C, Args, CmdArgs, Inputs);
4722 Args.AddAllArgs(CmdArgs, options::OPT_d_Flag);
4723 Args.AddAllArgs(CmdArgs, options::OPT_s);
4724 Args.AddAllArgs(CmdArgs, options::OPT_t);
4725 Args.AddAllArgs(CmdArgs, options::OPT_Z_Flag);
4726 Args.AddAllArgs(CmdArgs, options::OPT_u_Group);
4727 Args.AddLastArg(CmdArgs, options::OPT_e);
4728 Args.AddAllArgs(CmdArgs, options::OPT_m_Separate);
4729 Args.AddAllArgs(CmdArgs, options::OPT_r);
4735 CmdArgs.push_back("-ObjC");
4737 CmdArgs.push_back("-o");
4738 CmdArgs.push_back(Output.getFilename());
4747 CmdArgs
4750 CmdArgs.push_back("-ldylib1.o");
4753 CmdArgs.push_back("-ldylib1.o");
4755 CmdArgs.push_back("-ldylib1.10.5.o");
4763 CmdArgs.push_back("-lbundle1.o");
4766 CmdArgs.push_back("-lbundle1.o");
4769 CmdArgs.push_back("-lbundle1.o");
4778 CmdArgs.push_back("-lgcrt0.o");
4780 CmdArgs.push_back("-lgcrt1.o");
4791 CmdArgs.push_back("-no_new_main");
4796 CmdArgs.push_back("-lcrt0.o");
4801 CmdArgs.push_back("-lcrt1.o");
4804 CmdArgs.push_back("-lcrt1.o");
4806 CmdArgs.push_back("-lcrt1.3.1.o");
4809 CmdArgs.push_back("-lcrt1.o");
4811 CmdArgs.push_back("-lcrt1.10.5.o");
4813 CmdArgs.push_back("-lcrt1.10.6.o");
4827 CmdArgs.push_back(Str);
4831 Args.AddAllArgs(CmdArgs, options::OPT_L);
4841 CmdArgs.push_back("-undefined");
4842 CmdArgs.push_back("dynamic_lookup");
4848 CmdArgs.push_back("-lgomp");
4850 AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs);
4866 getDarwinToolChain().AddLinkARCArgs(Args, CmdArgs);
4868 CmdArgs.push_back("-framework");
4869 CmdArgs.push_back("Foundation");
4871 CmdArgs.push_back("-lobjc");
4875 CmdArgs.push_back("-arch_multiple");
4876 CmdArgs.push_back("-final_output");
4877 CmdArgs.push_back(LinkingOutput);
4881 CmdArgs.push_back("-allow_stack_execute");
4886 getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs);
4891 getDarwinToolChain().AddLinkRuntimeLibArgs(Args, CmdArgs);
4899 Args.AddAllArgs(CmdArgs, options::OPT_T_Group);
4900 Args.AddAllArgs(CmdArgs, options::OPT_F);
4904 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
4912 ArgStringList CmdArgs;
4914 CmdArgs.push_back("-create");
4917 CmdArgs.push_back("-output");
4918 CmdArgs.push_back(Output.getFilename());
4924 CmdArgs.push_back(II.getFilename());
4928 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
4936 ArgStringList CmdArgs;
4938 CmdArgs.push_back("-o");
4939 CmdArgs.push_back(Output.getFilename());
4944 CmdArgs.push_back(Input.getFilename());
4948 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
4956 ArgStringList CmdArgs;
4957 CmdArgs.push_back("--verify");
4958 CmdArgs.push_back("--debug-info");
4959 CmdArgs.push_back("--eh-frame");
4960 CmdArgs.push_back("--quiet");
4967 CmdArgs.push_back(Input.getFilename());
4971 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
4979 ArgStringList CmdArgs;
4981 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA,
4984 CmdArgs.push_back("-o");
4985 CmdArgs.push_back(Output.getFilename());
4990 CmdArgs.push_back(II.getFilename());
4995 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
5024 ArgStringList CmdArgs;
5027 CmdArgs.push_back("-C");
5031 CmdArgs.push_back("-e");
5032 CmdArgs.push_back("_start");
5036 CmdArgs.push_back("-Bstatic");
5037 CmdArgs.push_back("-dn");
5039 CmdArgs.push_back("-Bdynamic");
5041 CmdArgs.push_back("-shared");
5043 CmdArgs.push_back("--dynamic-linker");
5044 CmdArgs.push_back(Args.MakeArgString(LibPath + "ld.so.1"));
5049 CmdArgs.push_back("-o");
5050 CmdArgs.push_back(Output.getFilename());
5058 CmdArgs.push_back(Args.MakeArgString(LibPath + "crt1.o"));
5059 CmdArgs.push_back(Args.MakeArgString(LibPath + "crti.o"));
5060 CmdArgs.push_back(Args.MakeArgString(LibPath + "values-Xa.o"));
5061 CmdArgs.push_back(Args.MakeArgString(GCCLibPath + "crtbegin.o"));
5063 CmdArgs.push_back(Args.MakeArgString(LibPath + "crti.o"));
5064 CmdArgs.push_back(Args.MakeArgString(LibPath + "values-Xa.o"));
5065 CmdArgs.push_back(Args.MakeArgString(GCCLibPath + "crtbegin.o"));
5068 CmdArgs.push_back(Args.MakeArgString(LibPath + "cxa_finalize.o"));
5071 CmdArgs.push_back(Args.MakeArgString("-L" + GCCLibPath));
5073 Args.AddAllArgs(CmdArgs, options::OPT_L);
5074 Args.AddAllArgs(CmdArgs, options::OPT_T_Group);
5075 Args.AddAllArgs(CmdArgs, options::OPT_e);
5076 Args.AddAllArgs(CmdArgs, options::OPT_r);
5078 AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs);
5083 getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs);
5084 CmdArgs.push_back("-lgcc_s");
5086 CmdArgs.push_back("-lgcc");
5087 CmdArgs.push_back("-lc");
5088 CmdArgs.push_back("-lm");
5094 CmdArgs.push_back(Args.MakeArgString(GCCLibPath + "crtend.o"));
5096 CmdArgs.push_back(Args.MakeArgString(LibPath + "crtn.o"));
5098 addProfileRT(getToolChain(), Args, CmdArgs, getToolChain().getTriple());
5102 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
5110 ArgStringList CmdArgs;
5112 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA,
5115 CmdArgs.push_back("-o");
5116 CmdArgs.push_back(Output.getFilename());
5121 CmdArgs.push_back(II.getFilename());
5126 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
5134 ArgStringList CmdArgs;
5138 CmdArgs.push_back("-e");
5139 CmdArgs.push_back("_start");
5143 CmdArgs.push_back("-Bstatic");
5144 CmdArgs.push_back("-dn");
5146 // CmdArgs.push_back("--eh-frame-hdr");
5147 CmdArgs.push_back("-Bdynamic");
5149 CmdArgs.push_back("-shared");
5151 CmdArgs.push_back("--dynamic-linker");
5152 CmdArgs.push_back("/lib/ld.so.1"); // 64Bit Path /lib/amd64/ld.so.1
5157 CmdArgs.push_back("-o");
5158 CmdArgs.push_back(Output.getFilename());
5166 CmdArgs.push_back(Args.MakeArgString(
5168 CmdArgs.push_back(Args.MakeArgString(
5170 CmdArgs.push_back(Args.MakeArgString(
5173 CmdArgs.push_back(Args.MakeArgString(
5176 CmdArgs.push_back(Args.MakeArgString(
5180 CmdArgs.push_back(Args.MakeArgString("-L/opt/gcc4/lib/gcc/"
5184 Args.AddAllArgs(CmdArgs, options::OPT_L);
5185 Args.AddAllArgs(CmdArgs, options::OPT_T_Group);
5186 Args.AddAllArgs(CmdArgs, options::OPT_e);
5188 CmdArgs);
5194 CmdArgs.push_back("-lgcc");
5197 CmdArgs.push_back("-pthread");
5199 CmdArgs.push_back("-lc");
5200 CmdArgs.push_back("-lgcc");
5206 CmdArgs.push_back(Args.MakeArgString(
5210 addProfileRT(getToolChain(), Args, CmdArgs, getToolChain().getTriple());
5214 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
5222 ArgStringList CmdArgs;
5224 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA,
5227 CmdArgs.push_back("-o");
5228 CmdArgs.push_back(Output.getFilename());
5233 CmdArgs.push_back(II.getFilename());
5238 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
5247 ArgStringList CmdArgs;
5259 CmdArgs.push_back("-e");
5260 CmdArgs.push_back("__start");
5264 CmdArgs.push_back("-Bstatic");
5267 CmdArgs.push_back("-export-dynamic");
5268 CmdArgs.push_back("--eh-frame-hdr");
5269 CmdArgs.push_back("-Bdynamic");
5271 CmdArgs.push_back("-shared");
5273 CmdArgs.push_back("-dynamic-linker");
5274 CmdArgs.push_back("/usr/libexec/ld.so");
5279 CmdArgs.push_back("-nopie");
5282 CmdArgs.push_back("-o");
5283 CmdArgs.push_back(Output.getFilename());
5292 CmdArgs.push_back(Args.MakeArgString(
5295 CmdArgs.push_back(Args.MakeArgString(
5297 CmdArgs.push_back(Args.MakeArgString(
5300 CmdArgs.push_back(Args.MakeArgString(
5308 CmdArgs.push_back(Args.MakeArgString("-L/usr/lib/gcc-lib/" + Triple +
5311 Args.AddAllArgs(CmdArgs, options::OPT_L);
5312 Args.AddAllArgs(CmdArgs, options::OPT_T_Group);
5313 Args.AddAllArgs(CmdArgs, options::OPT_e);
5314 Args.AddAllArgs(CmdArgs, options::OPT_s);
5315 Args.AddAllArgs(CmdArgs, options::OPT_t);
5316 Args.AddAllArgs(CmdArgs, options::OPT_Z_Flag);
5317 Args.AddAllArgs(CmdArgs, options::OPT_r);
5319 AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs);
5324 getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs);
5326 CmdArgs.push_back("-lm_p");
5328 CmdArgs.push_back("-lm");
5333 CmdArgs.push_back("-lgcc");
5338 CmdArgs.push_back("-lpthread_p");
5340 CmdArgs.push_back("-lpthread");
5345 CmdArgs.push_back("-lc_p");
5347 CmdArgs.push_back("-lc");
5350 CmdArgs.push_back("-lgcc");
5356 CmdArgs.push_back(Args.MakeArgString(
5359 CmdArgs.push_back(Args.MakeArgString(
5365 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
5373 ArgStringList CmdArgs;
5375 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA,
5378 CmdArgs.push_back("-o");
5379 CmdArgs.push_back(Output.getFilename());
5384 CmdArgs.push_back(II.getFilename());
5389 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
5398 ArgStringList CmdArgs;
5402 CmdArgs.push_back("-e");
5403 CmdArgs.push_back("__start");
5407 CmdArgs.push_back("-Bstatic");
5410 CmdArgs.push_back("-export-dynamic");
5411 CmdArgs.push_back("--eh-frame-hdr");
5412 CmdArgs.push_back("-Bdynamic");
5414 CmdArgs.push_back("-shared");
5416 CmdArgs.push_back("-dynamic-linker");
5417 CmdArgs.push_back("/usr/libexec/ld.so");
5422 CmdArgs.push_back("-o");
5423 CmdArgs.push_back(Output.getFilename());
5432 CmdArgs.push_back(Args.MakeArgString(
5435 CmdArgs.push_back(Args.MakeArgString(
5437 CmdArgs.push_back(Args.MakeArgString(
5440 CmdArgs.push_back(Args.MakeArgString(
5445 Args.AddAllArgs(CmdArgs, options::OPT_L);
5446 Args.AddAllArgs(CmdArgs, options::OPT_T_Group);
5447 Args.AddAllArgs(CmdArgs, options::OPT_e);
5449 AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs);
5454 getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs);
5456 CmdArgs.push_back("-lm_p");
5458 CmdArgs.push_back("-lm");
5464 CmdArgs.push_back("-lpthread_p");
5466 CmdArgs.push_back("-lpthread");
5471 CmdArgs.push_back("-lc_p");
5473 CmdArgs.push_back("-lc");
5492 CmdArgs.push_back(Args.MakeArgString(myarch));
5498 CmdArgs.push_back(Args.MakeArgString(
5501 CmdArgs.push_back(Args.MakeArgString(
5507 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
5515 ArgStringList CmdArgs;
5520 CmdArgs.push_back("--32");
5522 CmdArgs.push_back("-a32");
5531 CmdArgs.push_back("-march");
5532 CmdArgs.push_back(CPUName.data());
5534 CmdArgs.push_back("-mabi");
5535 CmdArgs.push_back(getGnuCompatibleMipsABIName(ABIName).data());
5539 CmdArgs.push_back("-EB");
5541 CmdArgs.push_back("-EL");
5552 CmdArgs.push_back("-KPIC");
5556 CmdArgs.push_back("-mfpu=softvfp");
5560 CmdArgs.push_back("-meabi=5");
5564 CmdArgs.push_back("-matpcs");
5568 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA,
5571 CmdArgs.push_back("-o");
5572 CmdArgs.push_back(Output.getFilename());
5577 CmdArgs.push_back(II.getFilename());
5582 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
5593 ArgStringList CmdArgs;
5604 CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot));
5607 CmdArgs.push_back("-pie");
5610 CmdArgs.push_back("-Bstatic");
5613 CmdArgs.push_back("-export-dynamic");
5614 CmdArgs.push_back("--eh-frame-hdr");
5616 CmdArgs.push_back("-Bshareable");
5618 CmdArgs.push_back("-dynamic-linker");
5619 CmdArgs.push_back("/libexec/ld-elf.so.1");
5625 CmdArgs.push_back("--hash-style=both");
5628 CmdArgs.push_back("--enable-new-dtags");
5634 CmdArgs.push_back("-m");
5635 CmdArgs.push_back("elf_i386_fbsd");
5639 CmdArgs.push_back("-m");
5640 CmdArgs.push_back("elf32ppc_fbsd");
5644 CmdArgs.push_back("-o");
5645 CmdArgs.push_back(Output.getFilename());
5662 CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath(crt1)));
5664 CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crti.o")));
5674 CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath(crtbegin)));
5677 Args.AddAllArgs(CmdArgs, options::OPT_L);
5681 CmdArgs.push_back(Args.MakeArgString(StringRef("-L") + *i));
5682 Args.AddAllArgs(CmdArgs, options::OPT_T_Group);
5683 Args.AddAllArgs(CmdArgs, options::OPT_e);
5684 Args.AddAllArgs(CmdArgs, options::OPT_s);
5685 Args.AddAllArgs(CmdArgs, options::OPT_t);
5686 Args.AddAllArgs(CmdArgs, options::OPT_Z_Flag);
5687 Args.AddAllArgs(CmdArgs, options::OPT_r);
5689 AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs);
5694 ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs);
5696 CmdArgs.push_back("-lm_p");
5698 CmdArgs.push_back("-lm");
5703 CmdArgs.push_back("-lgcc_p");
5705 CmdArgs.push_back("-lgcc");
5707 CmdArgs.push_back("-lgcc_eh");
5709 CmdArgs.push_back("-lgcc_eh_p");
5711 CmdArgs.push_back("--as-needed");
5712 CmdArgs.push_back("-lgcc_s");
5713 CmdArgs.push_back("--no-as-needed");
5718 CmdArgs.push_back("-lpthread_p");
5720 CmdArgs.push_back("-lpthread");
5725 CmdArgs.push_back("-lc");
5727 CmdArgs.push_back("-lc_p");
5728 CmdArgs.push_back("-lgcc_p");
5730 CmdArgs.push_back("-lc");
5731 CmdArgs.push_back("-lgcc");
5735 CmdArgs.push_back("-lgcc_eh");
5737 CmdArgs.push_back("-lgcc_eh_p");
5739 CmdArgs.push_back("--as-needed");
5740 CmdArgs.push_back("-lgcc_s");
5741 CmdArgs.push_back("--no-as-needed");
5748 CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crtendS.o")));
5750 CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crtend.o")));
5751 CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crtn.o")));
5754 addProfileRT(ToolChain, Args, CmdArgs, ToolChain.getTriple());
5758 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
5766 ArgStringList CmdArgs;
5771 CmdArgs.push_back("--32");
5775 CmdArgs.push_back("-EB");
5777 CmdArgs.push_back("-EL");
5779 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA,
5782 CmdArgs.push_back("-o");
5783 CmdArgs.push_back(Output.getFilename());
5788 CmdArgs.push_back(II.getFilename());
5792 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
5801 ArgStringList CmdArgs;
5804 CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot));
5807 CmdArgs.push_back("-Bstatic");
5810 CmdArgs.push_back("-export-dynamic");
5811 CmdArgs.push_back("--eh-frame-hdr");
5813 CmdArgs.push_back("-Bshareable");
5815 CmdArgs.push_back("-dynamic-linker");
5816 CmdArgs.push_back("/libexec/ld.elf_so");
5823 CmdArgs.push_back("-m");
5824 CmdArgs.push_back("elf_i386");
5828 CmdArgs.push_back("-o");
5829 CmdArgs.push_back(Output.getFilename());
5837 CmdArgs.push_back(Args.MakeArgString(
5839 CmdArgs.push_back(Args.MakeArgString(
5841 CmdArgs.push_back(Args.MakeArgString(
5844 CmdArgs.push_back(Args.MakeArgString(
5846 CmdArgs.push_back(Args.MakeArgString(
5851 Args.AddAllArgs(CmdArgs, options::OPT_L);
5852 Args.AddAllArgs(CmdArgs, options::OPT_T_Group);
5853 Args.AddAllArgs(CmdArgs, options::OPT_e);
5854 Args.AddAllArgs(CmdArgs, options::OPT_s);
5855 Args.AddAllArgs(CmdArgs, options::OPT_t);
5856 Args.AddAllArgs(CmdArgs, options::OPT_Z_Flag);
5857 Args.AddAllArgs(CmdArgs, options::OPT_r);
5859 AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs);
5864 getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs);
5865 CmdArgs.push_back("-lm");
5870 CmdArgs.push_back("-lgcc_eh");
5872 CmdArgs.push_back("--as-needed");
5873 CmdArgs.push_back("-lgcc_s");
5874 CmdArgs.push_back("--no-as-needed");
5876 CmdArgs.push_back("-lgcc");
5879 CmdArgs.push_back("-lpthread");
5880 CmdArgs.push_back("-lc");
5882 CmdArgs.push_back("-lgcc");
5884 CmdArgs.push_back("-lgcc_eh");
5886 CmdArgs.push_back("--as-needed");
5887 CmdArgs.push_back("-lgcc_s");
5888 CmdArgs.push_back("--no-as-needed");
5895 CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(
5898 CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(
5900 CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(
5904 addProfileRT(getToolChain(), Args, CmdArgs, getToolChain().getTriple());
5907 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
5915 ArgStringList CmdArgs;
5920 CmdArgs.push_back("--32");
5922 CmdArgs.push_back("--64");
5924 CmdArgs.push_back("-a32");
5925 CmdArgs.push_back("-mppc");
5926 CmdArgs.push_back("-many");
5928 CmdArgs.push_back("-a64");
5929 CmdArgs.push_back("-mppc64");
5930 CmdArgs.push_back("-many");
5932 CmdArgs.push_back("-a64");
5933 CmdArgs.push_back("-mppc64le");
5934 CmdArgs.push_back("-many");
5938 CmdArgs.push_back("-mfpu=neon");
5942 CmdArgs.push_back(Args.MakeArgString("-mfloat-abi=" + ARMFloatABI));
5944 Args.AddLastArg(CmdArgs, options::OPT_march_EQ);
5945 Args.AddLastArg(CmdArgs, options::OPT_mcpu_EQ);
5946 Args.AddLastArg(CmdArgs, options::OPT_mfpu_EQ);
5955 CmdArgs.push_back("-march");
5956 CmdArgs.push_back(CPUName.data());
5958 CmdArgs.push_back("-mabi");
5959 CmdArgs.push_back(getGnuCompatibleMipsABIName(ABIName).data());
5963 CmdArgs.push_back("-EB");
5965 CmdArgs.push_back("-EL");
5967 Args.AddLastArg(CmdArgs, options::OPT_mips16, options::OPT_mno_mips16);
5968 Args.AddLastArg(CmdArgs, options::OPT_mmicromips,
5970 Args.AddLastArg(CmdArgs, options::OPT_mdsp, options::OPT_mno_dsp);
5971 Args.AddLastArg(CmdArgs, options::OPT_mdspr2, options::OPT_mno_dspr2);
5982 CmdArgs.push_back("-KPIC");
5988 CmdArgs.push_back(Args.MakeArgString("-march=" + CPUName));
5991 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA,
5994 CmdArgs.push_back("-o");
5995 CmdArgs.push_back(Output.getFilename());
6000 CmdArgs.push_back(II.getFilename());
6005 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
6017 ArgStringList &CmdArgs, const ArgList &Args) {
6022 CmdArgs.push_back("-lgcc");
6026 CmdArgs.push_back("-lgcc");
6029 CmdArgs.push_back("--as-needed");
6030 CmdArgs.push_back("-lgcc_s");
6032 CmdArgs.push_back("--no-as-needed");
6036 CmdArgs.push_back("-lgcc_eh");
6038 CmdArgs.push_back("-lgcc");
6046 CmdArgs.push_back("-ldl");
6102 ArgStringList CmdArgs;
6113 CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot));
6116 CmdArgs.push_back("-pie");
6119 CmdArgs.push_back("-export-dynamic");
6122 CmdArgs.push_back("-s");
6127 CmdArgs.push_back(i->c_str());
6130 CmdArgs.push_back("--eh-frame-hdr");
6133 CmdArgs.push_back("-m");
6135 CmdArgs.push_back("elf_i386");
6137 CmdArgs.push_back("aarch64linux");
6140 CmdArgs.push_back("armelf_linux_eabi");
6142 CmdArgs.push_back("elf32ppclinux");
6144 CmdArgs.push_back("elf64ppc");
6146 CmdArgs.push_back("elf32btsmip");
6148 CmdArgs.push_back("elf32ltsmip");
6151 CmdArgs.push_back("elf32btsmipn32");
6153 CmdArgs.push_back("elf64btsmip");
6157 CmdArgs.push_back("elf32ltsmipn32");
6159 CmdArgs.push_back("elf64ltsmip");
6162 CmdArgs.push_back("elf64_s390");
6164 CmdArgs.push_back("elf_x86_64");
6169 CmdArgs.push_back("-Bstatic");
6171 CmdArgs.push_back("-static");
6173 CmdArgs.push_back("-shared");
6175 CmdArgs.push_back("-Bsymbolic");
6183 CmdArgs.push_back("-dynamic-linker");
6184 CmdArgs.push_back(Args.MakeArgString(
6188 CmdArgs.push_back("-o");
6189 CmdArgs.push_back(Output.getFilename());
6204 CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath(crt1)));
6206 CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crti.o")));
6218 CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath(crtbegin)));
6221 ToolChain.AddFastMathRuntimeIfAvailable(Args, CmdArgs);
6224 Args.AddAllArgs(CmdArgs, options::OPT_L);
6230 CmdArgs.push_back(Args.MakeArgString(StringRef("-L") + *i));
6236 CmdArgs.push_back("-plugin");
6238 CmdArgs.push_back(Args.MakeArgString(Plugin));
6246 CmdArgs.push_back(
6251 CmdArgs.push_back(
6261 CmdArgs.push_back("--no-demangle");
6263 AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs);
6267 addUbsanRTLinux(getToolChain(), Args, CmdArgs, D.CCCIsCXX(),
6271 addAsanRTLinux(getToolChain(), Args, CmdArgs);
6273 addTsanRTLinux(getToolChain(), Args, CmdArgs);
6275 addMsanRTLinux(getToolChain(), Args, CmdArgs);
6277 addLsanRTLinux(getToolChain(), Args, CmdArgs);
6280 addProfileRTLinux(getToolChain(), Args, CmdArgs);
6288 CmdArgs.push_back("-Bstatic");
6289 ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs);
6291 CmdArgs.push_back("-Bdynamic");
6292 CmdArgs.push_back("-lm");
6298 CmdArgs.push_back("--start-group");
6302 CmdArgs.push_back("-lgomp");
6306 CmdArgs.push_back("-lrt");
6309 AddLibgcc(ToolChain.getTriple(), D, CmdArgs, Args);
6313 CmdArgs.push_back("-lpthread");
6315 CmdArgs.push_back("-lc");
6318 CmdArgs.push_back("--end-group");
6320 AddLibgcc(ToolChain.getTriple(), D, CmdArgs, Args);
6332 CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath(crtend)));
6334 CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crtn.o")));
6338 C.addCommand(new Command(JA, *this, ToolChain.Linker.c_str(), CmdArgs));
6346 ArgStringList CmdArgs;
6348 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA,
6351 CmdArgs.push_back("-o");
6352 CmdArgs.push_back(Output.getFilename());
6357 CmdArgs.push_back(II.getFilename());
6362 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
6371 ArgStringList CmdArgs;
6374 CmdArgs.push_back("-o");
6375 CmdArgs.push_back(Output.getFilename());
6382 CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath("crt1.o")));
6383 CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath("crti.o")));
6384 CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath("crtbegin.o")));
6385 CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath("crtn.o")));
6388 Args.AddAllArgs(CmdArgs, options::OPT_L);
6389 Args.AddAllArgs(CmdArgs, options::OPT_T_Group);
6390 Args.AddAllArgs(CmdArgs, options::OPT_e);
6392 AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs);
6394 addProfileRT(getToolChain(), Args, CmdArgs, getToolChain().getTriple());
6399 getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs);
6400 CmdArgs.push_back("-lm");
6407 CmdArgs.push_back("-lpthread");
6408 CmdArgs.push_back("-lc");
6409 CmdArgs.push_back("-lCompilerRT-Generic");
6410 CmdArgs.push_back("-L/usr/pkg/compiler-rt/lib");
6411 CmdArgs.push_back(
6416 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
6428 ArgStringList CmdArgs;
6433 CmdArgs.push_back("--32");
6435 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA,
6438 CmdArgs.push_back("-o");
6439 CmdArgs.push_back(Output.getFilename());
6444 CmdArgs.push_back(II.getFilename());
6449 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
6459 ArgStringList CmdArgs;
6465 CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot));
6467 CmdArgs.push_back("--eh-frame-hdr");
6469 CmdArgs.push_back("-Bstatic");
6472 CmdArgs.push_back("-export-dynamic");
6474 CmdArgs.push_back("-Bshareable");
6476 CmdArgs.push_back("-dynamic-linker");
6477 CmdArgs.push_back("/usr/libexec/ld-elf.so.2");
6479 CmdArgs.push_back("--hash-style=both");
6485 CmdArgs.push_back("-m");
6486 CmdArgs.push_back("elf_i386");
6490 CmdArgs.push_back("-o");
6491 CmdArgs.push_back(Output.getFilename());
6500 CmdArgs.push_back(Args.MakeArgString(
6504 CmdArgs.push_back(Args.MakeArgString(
6507 CmdArgs.push_back(Args.MakeArgString(
6511 CmdArgs.push_back(Args.MakeArgString(
6514 CmdArgs.push_back(Args.MakeArgString(
6517 CmdArgs.push_back(Args.MakeArgString(
6521 Args.AddAllArgs(CmdArgs, options::OPT_L);
6522 Args.AddAllArgs(CmdArgs, options::OPT_T_Group);
6523 Args.AddAllArgs(CmdArgs, options::OPT_e);
6525 AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs);
6532 CmdArgs.push_back("-L/usr/lib/gcc47");
6534 CmdArgs.push_back("-L/usr/lib/gcc44");
6538 CmdArgs.push_back("-rpath");
6539 CmdArgs.push_back("/usr/lib/gcc47");
6541 CmdArgs.push_back("-rpath");
6542 CmdArgs.push_back("/usr/lib/gcc44");
6547 getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs);
6548 CmdArgs
6552 CmdArgs.push_back("-lpthread");
6555 CmdArgs.push_back("-lc");
6561 CmdArgs.push_back("-lgcc");
6562 CmdArgs.push_back("-lgcc_eh");
6565 CmdArgs.push_back("-lgcc_pic");
6567 CmdArgs.push_back("-lgcc");
6569 CmdArgs.push_back("-lgcc");
6570 CmdArgs.push_back("--as-needed");
6571 CmdArgs.push_back("-lgcc_pic");
6572 CmdArgs.push_back("--no-as-needed");
6577 CmdArgs.push_back("-lgcc_pic");
6579 CmdArgs.push_back("-lgcc");
6587 CmdArgs.push_back(Args.MakeArgString(
6590 CmdArgs.push_back(Args.MakeArgString(
6592 CmdArgs.push_back(Args.MakeArgString(
6596 addProfileRT(getToolChain(), Args, CmdArgs, getToolChain().getTriple());
6600 C.addCommand(new Command(JA, *this, Exec, CmdArgs));
6608 ArgStringList CmdArgs;
6611 CmdArgs.push_back(Args.MakeArgString(std::string("-out:") +
6619 CmdArgs.push_back("-defaultlib:libcmt");
6622 CmdArgs.push_back("-nologo");
6624 Args.AddAllArgValues(CmdArgs, options::OPT_l);
6630 CmdArgs.push_back(it->getFilename());
6635 C.addCommand(new Command(JA, *this, Exec, CmdArgs));