Lines Matching +full:diag +full:- +full:version

1 //===--- HIPAMD.cpp - HIP Tool and ToolChain Implementations ----*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
46 Option O = A->getOption(); in shouldSkipSanitizeOption()
56 // For simplicity, we only allow -fsanitize=address in shouldSkipSanitizeOption()
57 SanitizerMask K = parseSanitizerValue(A->getValue(), /*AllowGroups=*/false); in shouldSkipSanitizeOption()
67 if (Loc == FeatureMap.end() || !Loc->second) { in shouldSkipSanitizeOption()
69 clang::diag::warn_drv_unsupported_option_for_offload_arch_req_feature) in shouldSkipSanitizeOption()
70 << A->getAsString(DriverArgs) << TargetID << "xnack+"; in shouldSkipSanitizeOption()
81 // Construct llvm-link command. in constructLlvmLinkCommand()
82 // The output from llvm-link is a bitcode file. in constructLlvmLinkCommand()
87 LlvmLinkArgs.append({"-o", Output.getFilename()}); in constructLlvmLinkCommand()
98 Args.MakeArgString(getToolChain().GetProgramPath("llvm-link")); in constructLlvmLinkCommand()
110 ArgStringList LldArgs{"-flavor", in constructLldCommand()
112 "-m", in constructLldCommand()
114 "--no-undefined", in constructLldCommand()
115 "-shared", in constructLldCommand()
116 "-plugin-opt=-amdgpu-internalize-symbols"}; in constructLldCommand()
118 LldArgs.push_back("-plugin-opt=-amdgpu-enable-hipstdpar"); in constructLldCommand()
126 // Extract all the -m options in constructLldCommand()
131 std::string MAttrString = "-plugin-opt=-mattr="; in constructLldCommand()
140 // ToDo: Remove this option after AMDGPU backend supports ISA-level linking. in constructLldCommand()
141 // Since AMDGPU backend currently does not support ISA-level linking, all in constructLldCommand()
144 LldArgs.push_back(Args.MakeArgString("-plugin-opt=-force-import-all")); in constructLldCommand()
148 Args.MakeArgString(Twine("-plugin-opt=") + A->getValue(0))); in constructLldCommand()
152 LldArgs.push_back("-save-temps"); in constructLldCommand()
160 // For example: host_A() (A.obj) --> host_B(B.obj) --> device_kernel_B() in constructLldCommand()
165 // --whole-archive flag such that all global symbols would be linked in. in constructLldCommand()
166 LldArgs.push_back("--whole-archive"); in constructLldCommand()
169 StringRef ArgVal = Arg->getValue(1); in constructLldCommand()
170 auto SplitArg = ArgVal.split("-mllvm="); in constructLldCommand()
173 Args.MakeArgString(Twine("-plugin-opt=") + SplitArg.second)); in constructLldCommand()
177 Arg->claim(); in constructLldCommand()
180 LldArgs.append({"-o", Output.getFilename()}); in constructLldCommand()
190 LldArgs.push_back("--no-whole-archive"); in constructLldCommand()
197 // For SPIR-V the inputs for the job are device AMDGCN SPIR-V flavoured bitcode
198 // and the output is either a compiled SPIR-V binary or bitcode (-emit-llvm). It
199 // calls llvm-link and then the llvm-spirv translator. Once the SPIR-V BE will
202 // SPIR-V.
212 // Emit SPIR-V binary. in constructLinkAndEmitSpirvCommand()
214 "--spirv-max-version=1.6", in constructLinkAndEmitSpirvCommand()
215 "--spirv-ext=+all", in constructLinkAndEmitSpirvCommand()
216 "--spirv-allow-extra-diexpressions", in constructLinkAndEmitSpirvCommand()
217 "--spirv-allow-unknown-intrinsics", in constructLinkAndEmitSpirvCommand()
218 "--spirv-lower-const-expr", in constructLinkAndEmitSpirvCommand()
219 "--spirv-preserve-auxdata", in constructLinkAndEmitSpirvCommand()
220 "--spirv-debug-info-version=nonsemantic-shader-200"}; in constructLinkAndEmitSpirvCommand()
225 // either an object file or bitcode (-emit-llvm). It calls llvm-link, opt,
255 // discover the clang-offload-bundler executable. in HIPAMDToolChain()
263 SanitizerMask K = parseSanitizerValue(A->getValue(), /*AllowGroups=*/false); in HIPAMDToolChain()
265 D.getDiags().Report(clang::diag::warn_drv_unsupported_option_for_target) in HIPAMDToolChain()
266 << A->getAsString(Args) << getTriple().str(); in HIPAMDToolChain()
278 CC1Args.push_back("-fcuda-is-device"); in addClangTargetOptions()
282 CC1Args.append({"-mllvm", "-amdgpu-internalize-symbols"}); in addClangTargetOptions()
284 CC1Args.append({"-mllvm", "-amdgpu-enable-hipstdpar"}); in addClangTargetOptions()
290 (Twine("--gpu-max-threads-per-block=") + MaxThreadsPerBlock).str(); in addClangTargetOptions()
294 CC1Args.push_back("-fcuda-allow-variadic-functions"); in addClangTargetOptions()
300 CC1Args.append({"-fvisibility=hidden"}); in addClangTargetOptions()
301 CC1Args.push_back("-fapply-global-visibility-to-externs"); in addClangTargetOptions()
304 // For SPIR-V we embed the command-line into the generated binary, in order to in addClangTargetOptions()
306 // options that match the user-supplied ones. in addClangTargetOptions()
309 CC1Args.push_back("-fembed-bitcode=marker"); in addClangTargetOptions()
312 CC1Args.push_back(BCFile.ShouldInternalize ? "-mlink-builtin-bitcode" in addClangTargetOptions()
313 : "-mlink-bitcode-file"); in addClangTargetOptions()
331 DAL->append(A); in TranslateArgs()
335 DAL->eraseArg(options::OPT_mcpu_EQ); in TranslateArgs()
336 DAL->AddJoinedArg(nullptr, Opts.getOption(options::OPT_mcpu_EQ), BoundArch); in TranslateArgs()
376 RocmInstallation->AddHIPIncludeArgs(DriverArgs, CC1Args); in AddHIPIncludeArgs()
406 // Find in --hip-device-lib-path and HIP_LIBRARY_PATH. in getDeviceLibs()
407 for (StringRef Path : RocmInstallation->getRocmDeviceLibPathArg()) in getDeviceLibs()
412 // Maintain compatability with --hip-device-lib. in getDeviceLibs()
426 getDriver().Diag(diag::err_drv_no_such_file) << BCName; in getDeviceLibs()
429 if (!RocmInstallation->hasDeviceLibrary()) { in getDeviceLibs()
430 getDriver().Diag(diag::err_drv_no_rocm_device_lib) << 0; in getDeviceLibs()
436 // If --hip-device-lib is not set, add the default bitcode libraries. in getDeviceLibs()
440 auto AsanRTL = RocmInstallation->getAsanRTLPath(); in getDeviceLibs()
447 getDriver().Diag(DiagID); in getDeviceLibs()
454 BCLibs.push_back(RocmInstallation->getHIPPath()); in getDeviceLibs()
468 getDriver().Diag(diag::err_drv_no_such_file) << InstLib; in getDeviceLibs()
478 getDriver().Diag(clang::diag::err_drv_bad_target_id) in checkTargetID()