Author: Ben Shi Date: 2024-11-01T08:51:24+08:00 New Revision: da9788359d35f4294bc6ec5323751e40981cdbe0
URL: https://github.com/llvm/llvm-project/commit/da9788359d35f4294bc6ec5323751e40981cdbe0 DIFF: https://github.com/llvm/llvm-project/commit/da9788359d35f4294bc6ec5323751e40981cdbe0.diff LOG: [clang][driver] Improve warning message for target AVR (#114394) Fixes https://github.com/llvm/llvm-project/issues/96743 Added: Modified: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/test/Driver/avr-toolchain.c Removed: ################################################################################ diff --git a/clang/include/clang/Basic/DiagnosticDriverKinds.td b/clang/include/clang/Basic/DiagnosticDriverKinds.td index 65551bd7761a9d..cdfdaa01fb121d 100644 --- a/clang/include/clang/Basic/DiagnosticDriverKinds.td +++ b/clang/include/clang/Basic/DiagnosticDriverKinds.td @@ -37,8 +37,7 @@ def warn_drv_invalid_arch_name_with_suggestion : Warning< "ignoring invalid /arch: argument '%0'; for %select{64|32}1-bit expected one of %2">, InGroup<UnusedCommandLineArgument>; def warn_drv_avr_mcu_not_specified : Warning< - "no target microcontroller specified on command line, cannot " - "link standard libraries, please pass -mmcu=<mcu name>">, + "no target microcontroller specified, please pass -mmcu=<mcu name>">, InGroup<AVRRtlibLinkingQuirks>; def warn_drv_avr_libc_not_found: Warning< "no avr-libc installation can be found on the system, " diff --git a/clang/test/Driver/avr-toolchain.c b/clang/test/Driver/avr-toolchain.c index 45ccf890febda8..9d17476f30a698 100644 --- a/clang/test/Driver/avr-toolchain.c +++ b/clang/test/Driver/avr-toolchain.c @@ -44,7 +44,7 @@ // RUN: %clang -### --target=avr --sysroot=%S/Inputs/basic_avr_tree -S %s 2>&1 | FileCheck --check-prefixes=NOMCU,LINKA %s // RUN: %clang -### --target=avr --sysroot=%S/Inputs/ -S %s 2>&1 | FileCheck --check-prefixes=NOMCU,LINKA %s // RUN: %clang -### --target=avr --sysroot=%S/Inputs/basic_avr_tree %s 2>&1 | FileCheck --check-prefixes=NOMCU,LINKB %s -// NOMCU: warning: no target microcontroller specified on command line, cannot link standard libraries, please pass -mmcu=<mcu name> +// NOMCU: warning: no target microcontroller specified, please pass -mmcu=<mcu name> // LINKB: warning: standard library not linked and so no interrupt vector table or compiler runtime routines will be linked // LINKB: warning: support for passing the data section address to the linker for microcontroller '' is not implemented // NOMCU-NOT: warning: {{.*}} avr-gcc _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits