benshi001 added a comment.

The previous logic of the constructor `AVRToolChain::AVRToolChain`

1. if `-c` or `-nostdlib` is specified, no error will rise (even if no MCU is 
specified).

2. if no MCU is specified, two warnings will rise

  warning: no target microcontroller specified on command line
  warning: standard library not linked and so no interrupt vector table



3. if the specified avr device has no proper avr family name, two warnings will 
rise

  warning: support for linking stdlibs for microcontroller '%0' is not 
implemented
  warning: standard library not linked and so no interrupt vector table



4. if no available avr-gcc is found, two warnings will rise

  waring: no avr-gcc installation can be found on the system,
  warning: standard library not linked and so no interrupt vector table



5. if no available avr-libc is found, two warnings will rise

  no avr-libc installation can be found on the system
  warning: standard library not linked and so no interrupt vector table

And after my re-arrangement of the constructor, the above points 2/3/4/5 do not 
change, except point 1, it changes to
if `-c` or `-nostdlib` is specified and a valid avr mcu is specified, no error 
will rise.
if `-c` or `-nostdlib` is specified but no valid avr mcu is specified, a 
warning will rise (`no target microcontroller specified on command line`)


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

https://reviews.llvm.org/D117423

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to