Details
- Reviewers
aykevl MaskRay dylanmckay
Diff Detail
Event Timeline
As changes in https://reviews.llvm.org/D123200,
it whould be better to support "--rtlib=compiler-rt" on AVR first.
clang/lib/Driver/ToolChains/AVR.cpp | ||
---|---|---|
430 | This method decides the file name of compiler-rt, it is expected to be libclang_rt.builtins-avrfamily.a, such as libclang_rt.builtins-avr51.a | |
433 | This method decides the library path of compiler-rt, it is /opt/avr-tool-chain/lib/clang/14.0.1/lib/avr | |
444 | Currently we still use libgcc if --rtlib option is not specified. | |
489 | Currently we only allow --rtlib=libgcc and --rtlib=compiler-rt | |
517 | If --rtlib is not specified or specified to libgcc, then we generate -L$PATH_TO_LIBGCC | |
557 | If --rtlib is not specified or specified to libgcc, then we generate -lgcc | |
570 | If --rtlib=compiler-rt is explicitly specified, we directly put the libclang.builtins-avrxxx.a as input file, other than -lclang.builtins-avrxxx, this is a tradition from other platforms, such as x86 and arm. |
clang/lib/Driver/ToolChains/AVR.cpp | ||
---|---|---|
430 | In -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=on mode this should be lib/clang/$version/lib/$triple/libclang_rt.xxx.a where there is no -microarch infix. |
clang/lib/Driver/ToolChains/AVR.cpp | ||
---|---|---|
430 | But I would expect each subarch has its own specific build with specific |
clang/lib/Driver/ToolChains/AVR.cpp | ||
---|---|---|
430 | This hook buildCompilerRTBasename with be called twice by the base class. The first time is called with AddArch = false, for which I do not append -microarch infix. For the second call with AddArch = true, I will append -microarch infix. |
This method decides the file name of compiler-rt, it is expected to be
libclang_rt.builtins-avrfamily.a, such as
libclang_rt.builtins-avr51.a
libclang_rt.builtins-avrtiny.a
libclang_rt.builtins-avrxmega3.a