[PATCH] D122553: [Driver][AVR] Fix warn_drv_avr_stdlib_not_linked condition

Ben Shi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 28 07:45:19 PDT 2022


benshi001 accepted this revision.
benshi001 added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/Driver/ToolChains/AVR.cpp:451
+      !Args.hasArg(options::OPT_nodefaultlibs)) {
+    if (CPU.empty()) {
+      // We cannot link any standard libraries without an MCU specified.
----------------
I think we should warn empty CPU name in the compile stage. For example, if user specified `-c` but not `-mmcu`, then we can not run to here to warn cpu is empty.

So I will accept and rebase on your code.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122553/new/

https://reviews.llvm.org/D122553



More information about the cfe-commits mailing list