Re: clang toolchain doesn't failing to compile properly
toggle quoted messageShow quoted text
What target are you trying to compile for?
From the stack overflow thread I find
Then some references to the Nordic HAL. So I’m just going to assume you are trying to target nrf52xx so what should be noted is that you can’t use the LLVM linker also I think you need to use the arm-none-eabi assembler also if you are targeting an ARM cortex-m
I got it to compile with LLVM and GCC/GNU assembler/linker. You will have to add an config in the /home/zephyrproject/modules/hal/nordic/nrfx/mdk/compiler_abstraction.h:66 that you are using Clang (ARMCC > 6 is an ARM version of Clang) I think it’s something
like __CLANG or it could be __llvm__ or __clang__.
Some discussion on it here:
Some of the changes are added here
Based on https://github.com/galak/zephyr/tree/llvm I believe.
I don’t have my old branch where I got it to build unfortunately so I don’t have anything direct to link too but was able to build and run hello world with clang + arm-none-eabi linker and assembler. Also I don’t remember the exact point in the code where
I had to add a print for it to work. There was some in-line assembly which was optimized out by clang if it was not used so I added a print and it would work. Sorry for not being very helpful thought I would just give you some information.
On Behalf Of
Akira Kato via Lists.Zephyrproject.Org
Thursday, January 30, 2020 7:13 PM
[Zephyr-devel] clang toolchain doesn't failing to compile properly
The problem is described there with the error logs.
Join firstname.lastname@example.org to automatically receive all group messages.