================ @@ -57,3 +57,30 @@ // RUN: %clang -### --target=avr -mmcu=atmega328 -fuse-ld=lld -flto --sysroot %S/Inputs/basic_avr_tree %s 2>&1 | FileCheck -check-prefix LINKS %s // LINKS: {{".*ld.*"}} {{.*}} "--defsym=__DATA_REGION_ORIGIN__=0x800100" "-plugin-opt=mcpu=atmega328" // LINKS-NOT: "-plugin-opt=thinlto" + +// RUN: %clang -### -r --target=avr -mmcu=atmega328 --sysroot %S/Inputs/basic_avr_tree %s 2>&1 | FileCheck --check-prefix=LINKU %s +// LINKU: {{".*ld.*"}} {{.*}} "-r" {{.*}} "-mavr5" +// LINKU-NOT: "--gc-sections" +// LINKU-NOT: {{"--defsym.*"}} +// LINKU-NOT: {{"-l.*"}} + +// RUN: %clang -### -r --target=avr -mmcu=atmega328 -fuse-ld=lld --sysroot %S/Inputs/basic_avr_tree %s 2>&1 | FileCheck --check-prefix=LINKV %s +// LINKV: {{".*ld.*"}} {{.*}} "-r" +// LINKV-NOT: "--gc-sections" +// LINKV-NOT: {{"--defsym.*"}} +// LINKV-NOT: {{"-l.*"}} +// LINKV-NOT: {{"-m.*"}} + +// RUN: %clang -### -r --target=avr -mmcu=atmega328 -lm --sysroot %S/Inputs/basic_avr_tree %s 2>&1 | FileCheck --check-prefix=LINKW %s +// LINKW: {{".*ld.*"}} {{.*}} "-r" "-lm" {{.*}} "-mavr5" +// LINKW-NOT: "--gc-sections" +// LINKW-NOT: {{"--defsym.*"}} + +// RUN: %clang -### -r --target=avr --sysroot %S/Inputs/basic_avr_tree %s 2>&1 | FileCheck --check-prefix=LINKX %s +// LINKX: {{".*ld.*"}} {{.*}} "-r" {{.*}} +// LINKX-NOT: warning: {{.*}} standard library ---------------- MaskRay wrote:
Use `-Werror` to test there are no warnings. `-###` exits with 1 when there is an error. Delete `-NOT: warning` patterns. https://github.com/llvm/llvm-project/pull/68484 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits