https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/114394
>From eb74d413d2f5e5dcc520282a5c59893d52222bf5 Mon Sep 17 00:00:00 2001 From: Ben Shi <benn...@tencent.com> Date: Thu, 31 Oct 2024 20:06:55 +0800 Subject: [PATCH] [clang][driver] Improve warning message for AVR when no '-mmcu' option is used Fixes https://github.com/llvm/llvm-project/issues/96743 --- clang/include/clang/Basic/DiagnosticDriverKinds.td | 3 +-- clang/test/Driver/avr-toolchain.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) 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