1 //==--- DiagnosticDriverKinds.td - libdriver diagnostics ------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 let Component = "Driver" in {
12 def err_drv_no_such_file : Error<"no such file or directory: '%0'">;
13 def err_drv_unsupported_opt : Error<"unsupported option '%0'">;
14 def err_drv_unsupported_opt_with_suggestion
15 : Error<"unsupported option '%0', did you mean '%1'?">;
16 def err_drv_unsupported_opt_for_target : Error<
17 "unsupported option '%0' for target '%1'">;
18 def err_drv_unsupported_option_argument : Error<
19 "unsupported argument '%1' to option '%0'">;
20 def err_drv_unknown_stdin_type : Error<
21 "-E or -x required when input is from standard input">;
22 def err_drv_unknown_stdin_type_clang_cl : Error<
23 "use /Tc or /Tp to set input type for standard input">;
24 def err_drv_unknown_language : Error<"language not recognized: '%0'">;
25 def err_drv_invalid_arch_name : Error<
26 "invalid arch name '%0'">;
27 def err_drv_invalid_riscv_arch_name : Error<
28 "invalid arch name '%0', %1">;
29 def err_drv_invalid_riscv_ext_arch_name : Error<
30 "invalid arch name '%0', %1 '%2'">;
31 def err_drv_cuda_bad_gpu_arch : Error<"Unsupported CUDA gpu architecture: %0">;
32 def err_drv_no_cuda_installation : Error<
33 "cannot find CUDA installation. Provide its path via --cuda-path, or pass "
34 "-nocudainc to build without CUDA includes.">;
35 def err_drv_no_cuda_libdevice : Error<
36 "cannot find libdevice for %0. Provide path to different CUDA installation "
37 "via --cuda-path, or pass -nocudalib to build without linking with libdevice.">;
38 def err_drv_cuda_version_unsupported : Error<
39 "GPU arch %0 is supported by CUDA versions between %1 and %2 (inclusive), "
40 "but installation at %3 is %4. Use --cuda-path to specify a different CUDA "
41 "install, pass a different GPU arch with --cuda-gpu-arch, or pass "
42 "--no-cuda-version-check.">;
43 def err_drv_cuda_host_arch : Error<"unsupported architecture '%0' for host compilation.">;
44 def err_drv_mix_cuda_hip : Error<"Mixed Cuda and HIP compilation is not supported.">;
45 def err_drv_invalid_thread_model_for_target : Error<
46 "invalid thread model '%0' in '%1' for this target">;
47 def err_drv_invalid_linker_name : Error<
48 "invalid linker name in argument '%0'">;
49 def err_drv_invalid_pgo_instrumentor : Error<
50 "invalid PGO instrumentor in argument '%0'">;
51 def err_drv_invalid_rtlib_name : Error<
52 "invalid runtime library name in argument '%0'">;
53 def err_drv_unsupported_rtlib_for_platform : Error<
54 "unsupported runtime library '%0' for platform '%1'">;
55 def err_drv_invalid_stdlib_name : Error<
56 "invalid library name in argument '%0'">;
57 def err_drv_invalid_output_with_multiple_archs : Error<
58 "cannot use '%0' output with multiple -arch options">;
59 def err_drv_no_input_files : Error<"no input files">;
60 def err_drv_use_of_Z_option : Error<
61 "unsupported use of internal gcc -Z option '%0'">;
62 def err_drv_output_argument_with_multiple_files : Error<
63 "cannot specify -o when generating multiple output files">;
64 def err_drv_out_file_argument_with_multiple_sources : Error<
65 "cannot specify '%0%1' when compiling multiple source files">;
66 def err_no_external_assembler : Error<
67 "there is no external assembler that can be used on this platform">;
68 def err_drv_unable_to_remove_file : Error<
69 "unable to remove file: %0">;
70 def err_drv_command_failure : Error<
71 "unable to execute command: %0">;
72 def err_drv_invalid_darwin_version : Error<
73 "invalid Darwin version number: %0">;
74 def err_drv_missing_argument : Error<
75 "argument to '%0' is missing (expected %1 value%s1)">;
76 def err_drv_invalid_Xarch_argument_with_args : Error<
77 "invalid Xarch argument: '%0', options requiring arguments are unsupported">;
78 def err_drv_invalid_Xarch_argument_isdriver : Error<
79 "invalid Xarch argument: '%0', cannot change driver behavior inside Xarch argument">;
80 def err_drv_Xopenmp_target_missing_triple : Error<
81 "cannot deduce implicit triple value for -Xopenmp-target, specify triple using -Xopenmp-target=<triple>">;
82 def err_drv_invalid_Xopenmp_target_with_args : Error<
83 "invalid -Xopenmp-target argument: '%0', options requiring arguments are unsupported">;
84 def err_drv_argument_only_allowed_with : Error<
85 "invalid argument '%0' only allowed with '%1'">;
86 def err_drv_argument_not_allowed_with : Error<
87 "invalid argument '%0' not allowed with '%1'">;
88 def err_drv_invalid_version_number : Error<
89 "invalid version number in '%0'">;
90 def err_drv_no_linker_llvm_support : Error<
91 "'%0': unable to pass LLVM bit-code files to linker">;
92 def err_drv_no_ast_support : Error<
93 "'%0': unable to use AST files with this tool">;
94 def err_drv_no_module_support : Error<
95 "'%0': unable to use module files with this tool">;
96 def err_drv_clang_unsupported : Error<
97 "the clang compiler does not support '%0'">;
98 def err_drv_clang_unsupported_opt_cxx_darwin_i386 : Error<
99 "the clang compiler does not support '%0' for C++ on Darwin/i386">;
100 def err_drv_clang_unsupported_opt_faltivec : Error<
101 "the clang compiler does not support '%0', %1">;
102 def err_drv_command_failed : Error<
103 "%0 command failed with exit code %1 (use -v to see invocation)">;
104 def err_drv_compilationdatabase : Error<
105 "compilation database '%0' could not be opened: %1">;
106 def err_drv_command_signalled : Error<
107 "%0 command failed due to signal (use -v to see invocation)">;
108 def err_drv_force_crash : Error<
109 "failing because %select{environment variable 'FORCE_CLANG_DIAGNOSTICS_CRASH' is set|'-gen-reproducer' is used}0">;
110 def err_drv_invalid_mfloat_abi : Error<
111 "invalid float ABI '%0'">;
112 def err_drv_invalid_mtp : Error<
113 "invalid thread pointer reading mode '%0'">;
114 def err_drv_missing_arg_mtp : Error<
115 "missing argument to '%0'">;
116 def err_drv_invalid_libcxx_deployment : Error<
117 "invalid deployment target for -stdlib=libc++ (requires %0 or later)">;
118 def err_drv_invalid_argument_to_fdebug_prefix_map : Error<
119 "invalid argument '%0' to -fdebug-prefix-map">;
120 def err_drv_malformed_sanitizer_blacklist : Error<
121 "malformed sanitizer blacklist: '%0'">;
122 def err_drv_duplicate_config : Error<
123 "no more than one option '--config' is allowed">;
124 def err_drv_config_file_not_exist : Error<
125 "configuration file '%0' does not exist">;
126 def err_drv_config_file_not_found : Error<
127 "configuration file '%0' cannot be found">;
128 def note_drv_config_file_searched_in : Note<
129 "was searched for in the directory: %0">;
130 def err_drv_cannot_read_config_file : Error<
131 "cannot read configuration file '%0'">;
132 def err_drv_nested_config_file: Error<
133 "option '--config' is not allowed inside configuration file">;
135 def err_target_unsupported_arch
136 : Error<"the target architecture '%0' is not supported by the target '%1'">;
137 def err_cpu_unsupported_isa
138 : Error<"CPU '%0' does not support '%1' execution mode">;
139 def err_arch_unsupported_isa
140 : Error<"Architecture '%0' does not support '%1' execution mode">;
142 def err_drv_I_dash_not_supported : Error<
143 "'%0' not supported, please use -iquote instead">;
144 def err_drv_unknown_argument : Error<"unknown argument: '%0'">;
145 def err_drv_unknown_argument_with_suggestion
146 : Error<"unknown argument '%0', did you mean '%1'?">;
147 def warn_drv_unknown_argument_clang_cl : Warning<
148 "unknown argument ignored in clang-cl: '%0'">,
149 InGroup<UnknownArgument>;
150 def warn_drv_unknown_argument_clang_cl_with_suggestion : Warning<
151 "unknown argument ignored in clang-cl '%0' (did you mean '%1'?)">,
152 InGroup<UnknownArgument>;
154 def warn_drv_ycyu_no_arg_clang_cl : Warning<
155 "support for '%0' without a filename not implemented yet; flag ignored">,
157 def warn_drv_ycyu_different_arg_clang_cl : Warning<
158 "support for '/Yc' and '/Yu' with different filenames not implemented yet; flags ignored">,
160 def warn_drv_ycyu_no_fi_arg_clang_cl : Warning<
161 "support for '%0' without a corresponding /FI flag not implemented yet; flag ignored">,
163 def warn_drv_yc_multiple_inputs_clang_cl : Warning<
164 "support for '/Yc' with more than one source file not implemented yet; flag ignored">,
167 def err_drv_invalid_value : Error<"invalid value '%1' in '%0'">;
168 def err_drv_invalid_int_value : Error<"invalid integral value '%1' in '%0'">;
169 def err_drv_invalid_remap_file : Error<
170 "invalid option '%0' not of the form <from-file>;<to-file>">;
171 def err_drv_invalid_gcc_output_type : Error<
172 "invalid output type '%0' for use with gcc tool">;
173 def err_drv_cc_print_options_failure : Error<
174 "unable to open CC_PRINT_OPTIONS file: %0">;
175 def err_drv_lto_without_lld : Error<"LTO requires -fuse-ld=lld">;
176 def err_drv_preamble_format : Error<
177 "incorrect format for -preamble-bytes=N,END">;
178 def warn_invalid_ios_deployment_target : Warning<
179 "invalid iOS deployment version '%0', iOS 10 is the maximum deployment "
180 "target for 32-bit targets">, InGroup<InvalidIOSDeploymentTarget>,
182 def err_drv_conflicting_deployment_targets : Error<
183 "conflicting deployment targets, both '%0' and '%1' are present in environment">;
184 def err_arc_unsupported_on_runtime : Error<
185 "-fobjc-arc is not supported on platforms using the legacy runtime">;
186 def err_arc_unsupported_on_toolchain : Error< // feel free to generalize this
187 "-fobjc-arc is not supported on versions of OS X prior to 10.6">;
188 def err_objc_weak_with_gc : Error<
189 "-fobjc-weak is not supported in Objective-C garbage collection">;
190 def err_objc_weak_unsupported : Error<
191 "-fobjc-weak is not supported on the current deployment target">;
192 def err_drv_mg_requires_m_or_mm : Error<
193 "option '-MG' requires '-M' or '-MM'">;
194 def err_drv_unknown_objc_runtime : Error<
195 "unknown or ill-formed Objective-C runtime '%0'">;
196 def err_drv_gnustep_objc_runtime_incompatible_binary : Error<
197 "GNUstep Objective-C runtime version %0 incompatible with target binary format">;
198 def err_drv_emit_llvm_link : Error<
199 "-emit-llvm cannot be used when linking">;
200 def err_drv_optimization_remark_pattern : Error<
202 def err_drv_no_neon_modifier : Error<"[no]neon is not accepted as modifier, please use [no]simd instead">;
203 def err_drv_invalid_omp_target : Error<"OpenMP target is invalid: '%0'">;
204 def err_drv_omp_host_ir_file_not_found : Error<
205 "The provided host compiler IR file '%0' is required to generate code for OpenMP target regions but cannot be found.">;
206 def err_drv_omp_host_target_not_supported : Error<
207 "The target '%0' is not a supported OpenMP host target.">;
208 def err_drv_expecting_fopenmp_with_fopenmp_targets : Error<
209 "The option -fopenmp-targets must be used in conjunction with a -fopenmp option compatible with offloading, please use -fopenmp=libomp or -fopenmp=libiomp5.">;
210 def warn_drv_omp_offload_target_duplicate : Warning<
211 "The OpenMP offloading target '%0' is similar to target '%1' already specified - will be ignored.">,
212 InGroup<OpenMPTarget>;
213 def warn_drv_omp_offload_target_missingbcruntime : Warning<
214 "No library '%0' found in the default clang lib directory or in LIBRARY_PATH. Expect degraded performance due to no inlining of runtime functions on target devices.">,
215 InGroup<OpenMPTarget>;
216 def err_drv_bitcode_unsupported_on_toolchain : Error<
217 "-fembed-bitcode is not supported on versions of iOS prior to 6.0">;
219 def warn_O4_is_O3 : Warning<"-O4 is equivalent to -O3">, InGroup<Deprecated>;
220 def warn_drv_optimization_value : Warning<"optimization level '%0' is not supported; using '%1%2' instead">,
221 InGroup<InvalidCommandLineArgument>;
222 def warn_ignored_gcc_optimization : Warning<"optimization flag '%0' is not supported">,
223 InGroup<IgnoredOptimizationArgument>;
224 def warn_ignored_clang_option : Warning<"the flag '%0' has been deprecated and will be ignored">,
225 InGroup<UnusedCommandLineArgument>;
226 def warn_drv_unsupported_opt_for_target : Warning<
227 "optimization flag '%0' is not supported for target '%1'">,
228 InGroup<IgnoredOptimizationArgument>;
229 def warn_drv_unsupported_debug_info_opt_for_target : Warning<
230 "debug information option '%0' is not supported for target '%1'">,
231 InGroup<UnsupportedTargetOpt>;
232 def warn_c_kext : Warning<
233 "ignoring -fapple-kext which is valid for C++ and Objective-C++ only">;
234 def warn_drv_input_file_unused : Warning<
235 "%0: '%1' input unused%select{ when '%3' is present|}2">,
236 InGroup<UnusedCommandLineArgument>;
237 def warn_drv_input_file_unused_by_cpp : Warning<
238 "%0: '%1' input unused in cpp mode">,
239 InGroup<UnusedCommandLineArgument>;
240 def warn_drv_preprocessed_input_file_unused : Warning<
241 "%0: previously preprocessed input%select{ unused when '%2' is present|}1">,
242 InGroup<UnusedCommandLineArgument>;
243 def warn_drv_unused_argument : Warning<
244 "argument unused during compilation: '%0'">,
245 InGroup<UnusedCommandLineArgument>;
246 def warn_drv_empty_joined_argument : Warning<
247 "joined argument expects additional value: '%0'">,
248 InGroup<UnusedCommandLineArgument>;
249 def warn_drv_diagnostics_hotness_requires_pgo : Warning<
250 "argument '%0' requires profile-guided optimization information">,
251 InGroup<UnusedCommandLineArgument>;
252 def warn_drv_clang_unsupported : Warning<
253 "the clang compiler does not support '%0'">;
254 def warn_drv_deprecated_arg : Warning<
255 "argument '%0' is deprecated, use '%1' instead">, InGroup<Deprecated>;
256 def warn_drv_assuming_mfloat_abi_is : Warning<
257 "unknown platform, assuming -mfloat-abi=%0">;
258 def warn_ignoring_ftabstop_value : Warning<
259 "ignoring invalid -ftabstop value '%0', using default value %1">;
260 def warn_drv_overriding_flag_option : Warning<
261 "overriding '%0' option with '%1'">,
262 InGroup<DiagGroup<"overriding-t-option">>;
263 def warn_drv_treating_input_as_cxx : Warning<
264 "treating '%0' input as '%1' when in C++ mode, this behavior is deprecated">,
266 def warn_drv_pch_not_first_include : Warning<
267 "precompiled header '%0' was ignored because '%1' is not first '-include'">;
268 def warn_missing_sysroot : Warning<"no such sysroot directory: '%0'">,
269 InGroup<DiagGroup<"missing-sysroot">>;
270 def warn_incompatible_sysroot : Warning<"using sysroot for '%0' but targeting '%1'">,
271 InGroup<DiagGroup<"incompatible-sysroot">>;
272 def warn_debug_compression_unavailable : Warning<"cannot compress debug sections (zlib not installed)">,
273 InGroup<DiagGroup<"debug-compression-unavailable">>;
274 def warn_drv_disabling_vptr_no_rtti_default : Warning<
275 "implicitly disabling vptr sanitizer because rtti wasn't enabled">,
276 InGroup<AutoDisableVptrSanitizer>;
277 def warn_drv_object_size_disabled_O0 : Warning<
278 "the object size sanitizer has no effect at -O0, but is explicitly enabled: %0">,
279 InGroup<InvalidCommandLineArgument>, DefaultWarnNoWerror;
281 def note_drv_command_failed_diag_msg : Note<
282 "diagnostic msg: %0">;
283 def note_drv_t_option_is_global : Note<
284 "The last /TC or /TP option takes precedence over earlier instances">;
285 def note_drv_address_sanitizer_debug_runtime : Note<
286 "AddressSanitizer doesn't support linking with debug runtime libraries yet">;
287 def note_drv_use_standard : Note<"use '%0'"
288 "%select{| or '%3'|, '%3', or '%4'|, '%3', '%4', or '%5'}2 "
289 "for '%1' standard">;
291 def err_analyzer_config_no_value : Error<
292 "analyzer-config option '%0' has a key but no value">;
293 def err_analyzer_config_multiple_values : Error<
294 "analyzer-config option '%0' should contain only one '='">;
296 def err_drv_invalid_hvx_length : Error<
297 "-mhvx-length is not supported without a -mhvx/-mhvx= flag">;
298 def warn_drv_vectorize_needs_hvx : Warning<
299 "auto-vectorization requires HVX, use -mhvx to enable it">,
300 InGroup<OptionIgnored>;
302 def err_drv_modules_validate_once_requires_timestamp : Error<
303 "option '-fmodules-validate-once-per-build-session' requires "
304 "'-fbuild-session-timestamp=<seconds since Epoch>' or '-fbuild-session-file=<file>'">;
306 def err_test_module_file_extension_format : Error<
307 "-ftest-module-file-extension argument '%0' is not of the required form "
308 "'blockname:major:minor:hashed:user info'">;
310 def warn_drv_invoking_fallback : Warning<"falling back to %0">,
313 def warn_slash_u_filename : Warning<"'/U%0' treated as the '/U' option">,
314 InGroup<DiagGroup<"slash-u-filename">>;
315 def note_use_dashdash : Note<"Use '--' to treat subsequent arguments as filenames">;
317 def err_drv_ropi_rwpi_incompatible_with_pic : Error<
318 "embedded and GOT-based position independence are incompatible">;
319 def err_drv_ropi_incompatible_with_cxx : Error<
320 "ROPI is not compatible with c++">;
322 def warn_target_unsupported_nan2008 : Warning<
323 "ignoring '-mnan=2008' option because the '%0' architecture does not support it">,
324 InGroup<UnsupportedNan>;
325 def warn_target_unsupported_nanlegacy : Warning<
326 "ignoring '-mnan=legacy' option because the '%0' architecture does not support it">,
327 InGroup<UnsupportedNan>;
328 def warn_target_unsupported_abslegacy : Warning<
329 "ignoring '-mabs=legacy' option because the '%0' architecture does not support it">,
330 InGroup<UnsupportedAbs>;
331 def warn_target_unsupported_abs2008 : Warning<
332 "ignoring '-mabs=2008' option because the '%0' architecture does not support it">,
333 InGroup<UnsupportedAbs>;
334 def warn_target_unsupported_compact_branches : Warning<
335 "ignoring '-mcompact-branches=' option because the '%0' architecture does not"
336 " support it">, InGroup<UnsupportedCB>;
337 def warn_drv_unsupported_gpopt : Warning<
338 "ignoring '-mgpopt' option as it cannot be used with %select{|the implicit"
339 " usage of }0-mabicalls">,
340 InGroup<UnsupportedGPOpt>;
341 def warn_drv_unsupported_longcalls : Warning<
342 "ignoring '-mlong-calls' option as it is not currently supported with "
343 "%select{|the implicit usage of }0-mabicalls">,
344 InGroup<OptionIgnored>;
345 def warn_drv_unsupported_pic_with_mabicalls : Warning<
346 "ignoring '%0' option as it cannot be used with "
347 "%select{implicit usage of|}1 -mabicalls and the N64 ABI">,
348 InGroup<OptionIgnored>;
349 def err_drv_unsupported_noabicalls_pic : Error<
350 "position-independent code requires ‘-mabicalls’">;
351 def err_drv_unsupported_indirect_jump_opt : Error<
352 "'-mindirect-jump=%0' is unsupported with the '%1' architecture">;
353 def err_drv_unknown_indirect_jump_opt : Error<
354 "unknown '-mindirect-jump=' option '%0'">;
356 def warn_drv_unable_to_find_directory_expected : Warning<
357 "unable to find %0 directory, expected to be in '%1'">,
358 InGroup<InvalidOrNonExistentDirectory>, DefaultIgnore;
360 def warn_drv_ps4_force_pic : Warning<
361 "option '%0' was ignored by the PS4 toolchain, using '-fPIC'">,
362 InGroup<OptionIgnored>;
364 def warn_drv_ps4_sdk_dir : Warning<
365 "environment variable SCE_ORBIS_SDK_DIR is set, but points to invalid or nonexistent directory '%0'">,
366 InGroup<InvalidOrNonExistentDirectory>;
368 def err_drv_unsupported_linker : Error<"unsupported value '%0' for -linker option">;
369 def err_drv_defsym_invalid_format : Error<"defsym must be of the form: sym=value: %0">;
370 def err_drv_defsym_invalid_symval : Error<"Value is not an integer: %0">;
371 def warn_drv_msvc_not_found : Warning<
372 "unable to find a Visual Studio installation; "
373 "try running Clang from a developer command prompt">,
374 InGroup<DiagGroup<"msvc-not-found">>;
376 def warn_drv_fine_grained_bitfield_accesses_ignored : Warning<
377 "option '-ffine-grained-bitfield-accesses' cannot be enabled together with a sanitizer; flag ignored">,
378 InGroup<OptionIgnored>;
380 def note_drv_verify_prefix_spelling : Note<
381 "-verify prefixes must start with a letter and contain only alphanumeric"
382 " characters, hyphens, and underscores">;
384 def warn_drv_experimental_isel_incomplete : Warning<
385 "-fexperimental-isel support for the '%0' architecture is incomplete">,
386 InGroup<ExperimentalISel>;
388 def warn_drv_experimental_isel_incomplete_opt : Warning<
389 "-fexperimental-isel support is incomplete for this architecture at the current optimization level">,
390 InGroup<ExperimentalISel>;
392 def warn_drv_moutline_unsupported_opt : Warning<
393 "The '%0' architecture does not support -moutline; flag ignored">,
394 InGroup<OptionIgnored>;