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

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 28 09:44:25 PDT 2022


MaskRay added inline comments.


================
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.
----------------
benshi001 wrote:
> 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.
The original code suggested that the diagnostic was intended for linking. As such, it should not fire for `-c`.


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