llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.11k stars 11.61k forks source link

[AVR] Linking to Arduino SDK standard library is broken #56409

Open KOLANICH opened 2 years ago

KOLANICH commented 2 years ago

Reproducer: https://github.com/KOLANICH/barebones_arduino_mega_2560_clang_test Fix: https://reviews.llvm.org/D127501

benshi001 commented 2 years ago

It seems your demo program reveals more bugs than current one: (https://github.com/KOLANICH/barebones_arduino_mega_2560_clang_test)

https://github.com/llvm/llvm-project/issues/56426 https://github.com/llvm/llvm-project/issues/56423

I got many crashes when building your program with debug version clang++, and simplify them to the above two bugs.

benshi001 commented 2 years ago

committed as https://reviews.llvm.org/rG2d01a8572076a93fa40c4af934e78a859f3096ee https://github.com/llvm/llvm-project/commit/2d01a8572076a93fa40c4af934e78a859f3096ee