Skip to content

LLVM support on all applicable architectures #3689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task
zephyrbot opened this issue Jun 7, 2017 · 15 comments
Open
1 task

LLVM support on all applicable architectures #3689

zephyrbot opened this issue Jun 7, 2017 · 15 comments
Labels
area: Toolchains Toolchains Feature A planned feature with a milestone priority: medium Medium impact/importance bug

Comments

@zephyrbot
Copy link
Collaborator

zephyrbot commented Jun 7, 2017

Reported by Anas Nashif:

Expand LLVM support to all architectures with LLVM toolchain

(Imported from Jira ZEP-2253)

@zephyrbot
Copy link
Collaborator Author

by Mark Linkmeyer:

Moved to 1.10 per review with Chris

@zephyrbot zephyrbot added area: Toolchains Toolchains Feature A planned feature with a milestone labels Sep 23, 2017
@zephyrbot zephyrbot added this to the v1.10.0 milestone Sep 23, 2017
@nashif
Copy link
Member

nashif commented Oct 20, 2017

depends on Cmake integration.

Some platforms will be able to build, but not link, so we need gcc as well.

@galak galak modified the milestones: v1.10.0, v1.11.0 Nov 14, 2017
@galak galak mentioned this issue Dec 12, 2017
38 tasks
@nashif nashif modified the milestones: v1.11.0, v1.12.0 Feb 22, 2018
@carlescufi carlescufi mentioned this issue Mar 9, 2018
44 tasks
@Skjerve
Copy link

Skjerve commented Apr 30, 2018

Is this still on track for 1.12?

@nashif nashif removed this from the v1.12.0 milestone Jun 5, 2018
@nashif nashif added the priority: medium Medium impact/importance bug label Aug 21, 2018
@galak
Copy link
Collaborator

galak commented Sep 21, 2018

how far did you get with llvm, any instructions on how to replicate what you have so far?

@marc-hb
Copy link
Collaborator

marc-hb commented Jun 21, 2019

Mentioning clang PR #14077 just for the record, I understand it's only for host toolchain and x86

@raveslave
Copy link

Anyone running their projects as native_posix + LLVM in Xcode (macOS) ?

@ochipara
Copy link

ochipara commented Aug 6, 2019

I am trying to use llvm/clang to build the helloworld sample. I have managed to run through the cmake configuration, but I am running into some compilation issues. Specifically, the following clang gets stuck trying to compile the following asm instruction:
In file included from /Users/ochipara/Working/embedded/zephyrproject/zephyr/kernel/fatal.c:7:
In file included from /Users/ochipara/Working/embedded/zephyrproject/zephyr/include/kernel.h:17:
In file included from /Users/ochipara/Working/embedded/zephyrproject/zephyr/include/kernel_includes.h:34:
In file included from /Users/ochipara/Working/embedded/zephyrproject/zephyr/include/arch/cpu.h:17:
In file included from /Users/ochipara/Working/embedded/zephyrproject/zephyr/include/arch/arm/arch.h:33:
In file included from /Users/ochipara/Working/embedded/zephyrproject/zephyr/include/arch/arm/asm_inline.h:18:
/Users/ochipara/Working/embedded/zephyrproject/zephyr/include/arch/arm/asm_inline_gcc.h:86:3: error: invalid operand for instruction
"mov %1, %2;"
^
:1:22: note: instantiated into assembly here
mov r1, #32;mrs r0, BASEPRI;msr BASEPRI, r1;isb;
^
In file included from /Users/ochipara/Working/embedded/zephyrproject/zephyr/kernel/fatal.c:7:
In file included from /Users/ochipara/Working/embedded/zephyrproject/zephyr/include/kernel.h:17:
In file included from /Users/ochipara/Working/embedded/zephyrproject/zephyr/include/kernel_includes.h:34:
In file included from /Users/ochipara/Working/embedded/zephyrproject/zephyr/include/arch/cpu.h:17:
In file included from /Users/ochipara/Working/embedded/zephyrproject/zephyr/include/arch/arm/arch.h:33:
In file included from /Users/ochipara/Working/embedded/zephyrproject/zephyr/include/arch/arm/asm_inline.h:18:
/Users/ochipara/Working/embedded/zephyrproject/zephyr/include/arch/arm/asm_inline_gcc.h:86:3: error: invalid operand for instruction
"mov %1, %2;"
^
:1:34: note: instantiated into assembly here
mov r1, #32;mrs r0, BASEPRI;msr BASEPRI, r1;isb;
^
In file included from /Users/ochipara/Working/embedded/zephyrproject/zephyr/kernel/fatal.c:7:
In file included from /Users/ochipara/Working/embedded/zephyrproject/zephyr/include/kernel.h:17:
In file included from /Users/ochipara/Working/embedded/zephyrproject/zephyr/include/kernel_includes.h:34:
In file included from /Users/ochipara/Working/embedded/zephyrproject/zephyr/include/arch/cpu.h:17:
In file included from /Users/ochipara/Working/embedded/zephyrproject/zephyr/include/arch/arm/arch.h:33:
In file included from /Users/ochipara/Working/embedded/zephyrproject/zephyr/include/arch/arm/asm_inline.h:18:
/Users/ochipara/Working/embedded/zephyrproject/zephyr/include/arch/arm/asm_inline_gcc.h:86:3: error: instruction requires: data-barriers
"mov %1, %2;"
^
:1:46: note: instantiated into assembly here
mov r1, #32;mrs r0, BASEPRI;msr BASEPRI, r1;isb;

Any suggestions on how this may be fixed? Thanks!

@jettr
Copy link
Collaborator

jettr commented Oct 14, 2020

We are very interested in LLVM support for ARM (and RISC-V). Is this something that is realistic for 2.5?

@galak
Copy link
Collaborator

galak commented Oct 14, 2020

We are very interested in LLVM support for ARM (and RISC-V). Is this something that is realistic for 2.5?

@jettr - curious what config of LLVM you guys are interested in? Meaning I assume this means clang, but which linker and assembler are you guys interested in utilizing.

@jettr
Copy link
Collaborator

jettr commented Oct 14, 2020

Yes, we would be using Clang and LLD ideally with compiler-rt

@msink
Copy link

msink commented Oct 14, 2020

Ideally support for generic clang/llvm toolchain for ARM - it can open doors for programming on modern llvm based languages, like Rust or Kotlin.

@markand
Copy link
Contributor

markand commented Mar 28, 2022

I come a little bit late into the party but I'm interested in this as well since clang is de-facto a cross compiler which does not require to rebuild GCC in many flavors (all that triplets that you know of). I'm pretty confident with LLVM builds and its toolchains but not in the embedded areas. For curiosity I've built some apps for zephyr using verbose ninja rules and was surprised to see how many linker options are required so I may help in the LLVM process but may not in the ARM and other platforms specific options.

@zzzh
Copy link

zzzh commented Mar 29, 2022

there's already a LLVM Embedded Toolchain for Arm, please get it supported!!!

@zzzh
Copy link

zzzh commented Mar 30, 2022

Sorry, just realized that it's a bare-metal toolchain.

@hakehuang
Copy link
Collaborator

@nashif any planning to support this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Toolchains Toolchains Feature A planned feature with a milestone priority: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests