Bug 9417

Summary: Bring clang/llvm compiler infrastructure to OE-Core
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Khem Raj <raj.khem>
Component: devtools / tool chainAssignee: Ross Burton <ross.burton>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: akuster, jon.richardson, meta.mr.watcher, meta.watcher, otavio, randy.macleod, richard.purdie, ross.burton, scott.branden
Version: unspecified   
Target Milestone: 5.99   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: New (Never tested)
Verified: Documentation change: Yes (doc changes required)
Bug Depends on: 11528, 11529    
Bug Blocks:    

Description Khem Raj 2016-04-07 17:21:22 UTC
There has been multiple demands from developers and users to use Clang compiler with OE
which is currently provided via meta-clang. This is a feature request to merge meta-clang into OE-Core in 2.2 release time frame

The tools should be merged such that

1. Both compilers are available in a build where building clang is optional
2. Default remains to use gcc however a user knob is provided to switch the default to be clang.
3. Provide a knob such as TOOLCHAIN variable in global config metadata so it can be used per recipe to pin it to a particular compiler.
Comment 1 Ross Burton 2016-04-11 20:57:08 UTC
*** Bug 6042 has been marked as a duplicate of this bug. ***
Comment 2 Richard Purdie 2016-04-14 14:37:38 UTC
I think that adding llvm itself might be desired by a number of people but clang as a compiler option might be a step too far for 2.2.
Comment 3 Khem Raj 2016-04-14 15:27:31 UTC
(In reply to comment #2)
> I think that adding llvm itself might be desired by a number of people but
> clang as a compiler option might be a step too far for 2.2.

We can see if we can make clang as packageconfig option, I believe it will require
a refactoring otherwise which could be regressive.
Comment 4 Khem Raj 2016-11-14 17:41:34 UTC
should we target Clang/llvm in OE-Core ?
Comment 5 Khem Raj 2017-06-19 17:15:59 UTC
Only llvm will be brought in in 2.3 time frame.
Comment 6 Khem Raj 2017-07-31 17:14:01 UTC
llvm has been committed. Clang still remains in meta-clang, move this ticket to next major release
Comment 7 Randy MacLeod 2021-09-30 15:29:26 UTC
Ross, Apparently you are interested in this...
Comment 8 Ross Burton 2021-09-30 15:31:38 UTC
Interested in the infrastructure but not moving the actual toolchain, yet.
Comment 9 Khem Raj 2021-09-30 15:54:05 UTC
(In reply to comment #8)
> Interested in the infrastructure but not moving the actual toolchain, yet.

I think we should discuss it more for next LTS, perhaps it would be appropriate to add it to Core.
Comment 10 Ross Burton 2025-10-09 14:55:18 UTC
master (will be whinlatter) now has both clang and TOOLCHAIN support. I guess the latest commit that is relevant is oe-core 45bdedd213aff8df3214b95ef2a8551c0abd93a0 (adding toolchain abstraction).