Lines Matching +full:diag +full:- +full:version
1 //===--- Fuchsia.cpp - Fuchsia ToolChain Implementations --------*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
44 // Silence warning for "clang -g foo.o -o foo" in ConstructJob()
46 // and "clang -emit-llvm foo.o -o foo" in ConstructJob()
48 // and for "clang -w foo.o -o foo". Other warning options are already in ConstructJob()
52 CmdArgs.push_back("-z"); in ConstructJob()
53 CmdArgs.push_back("max-page-size=4096"); in ConstructJob()
55 CmdArgs.push_back("-z"); in ConstructJob()
58 CmdArgs.push_back("-z"); in ConstructJob()
59 CmdArgs.push_back("start-stop-visibility=hidden"); in ConstructJob()
64 CmdArgs.push_back("-z"); in ConstructJob()
66 CmdArgs.push_back("-z"); in ConstructJob()
67 CmdArgs.push_back("separate-loadable-segments"); in ConstructJob()
68 CmdArgs.push_back("-z"); in ConstructJob()
70 CmdArgs.push_back("--pack-dyn-relocs=relr"); in ConstructJob()
74 CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot)); in ConstructJob()
77 CmdArgs.push_back("-pie"); in ConstructJob()
80 CmdArgs.push_back("-export-dynamic"); in ConstructJob()
83 CmdArgs.push_back("-s"); in ConstructJob()
86 CmdArgs.push_back("-r"); in ConstructJob()
88 CmdArgs.push_back("--build-id"); in ConstructJob()
89 CmdArgs.push_back("--hash-style=gnu"); in ConstructJob()
93 CmdArgs.push_back("--execute-only"); in ConstructJob()
96 if (CPU.empty() || CPU == "generic" || CPU == "cortex-a53") in ConstructJob()
97 CmdArgs.push_back("--fix-cortex-a53-843419"); in ConstructJob()
100 CmdArgs.push_back("--eh-frame-hdr"); in ConstructJob()
103 CmdArgs.push_back("-Bstatic"); in ConstructJob()
105 CmdArgs.push_back("-shared"); in ConstructJob()
118 CmdArgs.push_back("-dynamic-linker"); in ConstructJob()
123 CmdArgs.push_back("-X"); in ConstructJob()
125 CmdArgs.push_back("--no-relax"); in ConstructJob()
128 CmdArgs.push_back("-o"); in ConstructJob()
146 Inputs, [](const InputInfo &II) -> bool { return II.isFilename(); }); in ConstructJob()
162 CmdArgs.push_back("-Bdynamic"); in ConstructJob()
168 CmdArgs.push_back("--push-state"); in ConstructJob()
169 CmdArgs.push_back("--as-needed"); in ConstructJob()
171 CmdArgs.push_back("-Bstatic"); in ConstructJob()
174 CmdArgs.push_back("-Bdynamic"); in ConstructJob()
175 CmdArgs.push_back("-lm"); in ConstructJob()
176 CmdArgs.push_back("--pop-state"); in ConstructJob()
193 CmdArgs.push_back("-lpthread"); in ConstructJob()
196 CmdArgs.push_back("--wrap=pthread_create"); in ConstructJob()
199 CmdArgs.push_back("-lc"); in ConstructJob()
214 // Silence warning for "clang -g foo.o -o foo" in ConstructJob()
216 // and "clang -emit-llvm foo.o -o foo" in ConstructJob()
218 // and for "clang -w foo.o -o foo". Other warning options are already in ConstructJob()
221 // Silence warnings when linking C code with a C++ '-stdlib' argument. in ConstructJob()
224 // ar tool command "llvm-ar <options> <output_file> <input_files>". in ConstructJob()
241 D.Diag(diag::err_drv_unable_to_remove_file) << EC.message(); in ConstructJob()
252 /// Fuchsia - Fuchsia tool chain which can call as(1) and ld(1) directly.
265 auto FilePaths = [&](const Multilib &M) -> std::vector<std::string> { in Fuchsia()
276 // Use the noexcept variant with -fno-exceptions to avoid the extra overhead. in Fuchsia()
278 .flag("-fexceptions", /*Disallow=*/true) in Fuchsia()
279 .flag("-fno-exceptions") in Fuchsia()
281 // ASan has higher priority because we always want the instrumentated version. in Fuchsia()
283 .flag("-fsanitize=address") in Fuchsia()
285 // Use the asan+noexcept variant with ASan and -fno-exceptions. in Fuchsia()
287 .flag("-fsanitize=address") in Fuchsia()
288 .flag("-fexceptions", /*Disallow=*/true) in Fuchsia()
289 .flag("-fno-exceptions") in Fuchsia()
292 // version. in Fuchsia()
294 .flag("-fsanitize=hwaddress") in Fuchsia()
296 // Use the hwasan+noexcept variant with HWASan and -fno-exceptions. in Fuchsia()
298 .flag("-fsanitize=hwaddress") in Fuchsia()
299 .flag("-fexceptions", /*Disallow=*/true) in Fuchsia()
300 .flag("-fno-exceptions") in Fuchsia()
304 .flag("-fc++-abi=itanium") in Fuchsia()
315 addMultilibFlag(Exceptions, "-fexceptions", Flags); in Fuchsia()
316 addMultilibFlag(!Exceptions, "-fno-exceptions", Flags); in Fuchsia()
317 addMultilibFlag(getSanitizerArgs(Args).needsAsanRt(), "-fsanitize=address", in Fuchsia()
320 "-fsanitize=hwaddress", Flags); in Fuchsia()
323 "-fc++-abi=itanium", Flags); in Fuchsia()
328 // Ensure that -print-multi-directory only outputs one multilib directory. in Fuchsia()
357 StringRef Value = A->getValue(); in GetRuntimeLibType()
358 if (Value != "compiler-rt") in GetRuntimeLibType()
359 getDriver().Diag(clang::diag::err_drv_invalid_rtlib_name) in GetRuntimeLibType()
360 << A->getAsString(Args); in GetRuntimeLibType()
369 StringRef Value = A->getValue(); in GetCXXStdlibType()
371 getDriver().Diag(diag::err_drv_invalid_stdlib_name) in GetCXXStdlibType()
372 << A->getAsString(Args); in GetCXXStdlibType()
383 CC1Args.push_back("-fno-use-init-array"); in addClangTargetOptions()
402 // Check for configure-time C include directories. in AddClangSystemIncludeArgs()
432 std::string Version = detectLibcxxVersion(Path); in AddClangCXXStdlibIncludeArgs() local
433 if (Version.empty()) in AddClangCXXStdlibIncludeArgs()
436 // First add the per-target multilib include dir. in AddClangCXXStdlibIncludeArgs()
440 llvm::sys::path::append(TargetDir, Target, M.gccSuffix(), "c++", Version); in AddClangCXXStdlibIncludeArgs()
446 // Second add the per-target include dir. in AddClangCXXStdlibIncludeArgs()
448 llvm::sys::path::append(TargetDir, Target, "c++", Version); in AddClangCXXStdlibIncludeArgs()
454 llvm::sys::path::append(Dir, "c++", Version); in AddClangCXXStdlibIncludeArgs()
475 CmdArgs.push_back("-lc++"); in AddCXXStdlibLibArgs()
477 CmdArgs.push_back("-lc++experimental"); in AddCXXStdlibLibArgs()