summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorUlrich Ölmann <u.oelmann@pengutronix.de>2021-12-01 15:47:51 +0100
committerKhem Raj <raj.khem@gmail.com>2021-12-01 07:24:18 -0800
commit9b55daf766795d6f04466dc2439198a6e271ee50 (patch)
treed03b083f4fc3069d62517b6402fe2d36872c70b7 /README.md
parent85fb0a622e0e9a7b2bb7e7035d66dab90e0432b4 (diff)
downloadmeta-clang-9b55daf766795d6f04466dc2439198a6e271ee50.tar.gz
README: fix typos
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Diffstat (limited to 'README.md')
-rw-r--r--README.md28
1 files changed, 14 insertions, 14 deletions
diff --git a/README.md b/README.md
index 7be4ada..c85b992 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
4 4
5This layer provides [clang/llvm](http://clang.llvm.org/) as alternative to system 5This layer provides [clang/llvm](http://clang.llvm.org/) as alternative to system
6C/C++ compiler for OpenEmbedded/Yocto Project based distributions. This can cohabit 6C/C++ compiler for OpenEmbedded/Yocto Project based distributions. This can cohabit
7with GNU Compiler and can be used for specific recipes or full system Compiler 7with GNU compiler and can be used for specific recipes or full system compiler.
8 8
9# Getting Started 9# Getting Started
10 10
@@ -49,30 +49,30 @@ you can select clang per recipe too by writing bbappends for them containing
49TOOLCHAIN = "clang" 49TOOLCHAIN = "clang"
50``` 50```
51also look at `conf/nonclangable.conf` for list of recipes which do not yet fully 51also look at `conf/nonclangable.conf` for list of recipes which do not yet fully
52build with clang 52build with clang.
53 53
54# Default Compiler Runtime 54# Default Compiler Runtime
55 55
56Default is to use GNU runtime `RUNTIME = "gnu"` which consists of libgcc, libstdc++ to provide C/C++ 56Default is to use GNU runtime `RUNTIME = "gnu"` which consists of libgcc, libstdc++ to provide C/C++
57runtime support. However its possible to use LLVM runtime to replace it where 57runtime support. However it's possible to use LLVM runtime to replace it where
58compile-rt, llvm libunwind, and libc++ are used to provide C/C++ runtime, while 58compile-rt, llvm libunwind, and libc++ are used to provide C/C++ runtime, while
59GNU runtime works with both GCC and Clang, LLVM runtime is only tested with Clang 59GNU runtime works with both GCC and Clang, LLVM runtime is only tested with Clang
60compiler, Switching to use LLVM runtime is done via a config metadata knob 60compiler, switching to use LLVM runtime is done via a config metadata knob
61 61
62```shell 62```shell
63RUNTIME = "llvm" 63RUNTIME = "llvm"
64``` 64```
65 65
66RUNTIME variable influences individual runtime elements and can be set explcitly as well 66RUNTIME variable influences individual runtime elements and can be set explicitly as well
67e.g. `LIBCPLUSPLUS` `COMPILER_RT` and `UNWINDLIB` 67e.g. `LIBCPLUSPLUS` `COMPILER_RT` and `UNWINDLIB`.
68 68
69Please note that this will still use crt files from GNU compiler always, while llvm now 69Please note that this will still use crt files from GNU compiler always, while llvm now
70do provide crt files, they have not been yet intergrated into toolchain 70do provide crt files, they have not been yet integrated into the toolchain.
71 71
72# Default C++ Standard Library Switch 72# Default C++ Standard Library Switch
73 73
74Using RUNTIME bariable will select which C++ runtime is used, however it can be overridden 74Using RUNTIME variable will select which C++ runtime is used, however it can be overridden
75if needed to by modifying `LIBCPLUSPLUS` variable, usually defaults used by `RUNTIME` is 75if needed to by modifying `LIBCPLUSPLUS` variable, usually defaults used by `RUNTIME` are
76best fit. e.g. below we select LLVM C++ as default C++ runtime. 76best fit. e.g. below we select LLVM C++ as default C++ runtime.
77 77
78```shell 78```shell
@@ -85,14 +85,14 @@ You can select libstdc++ per package too by writing bbappends for them containin
85```shell 85```shell
86LIBCPLUSPLUS:toolchain-clang:pn-<recipe> = "-stdlibc=libc++" 86LIBCPLUSPLUS:toolchain-clang:pn-<recipe> = "-stdlibc=libc++"
87``` 87```
88Defaults are chosen to be GNU for maximum compatibility with existing GNU systems. Its always 88Defaults are chosen to be GNU for maximum compatibility with existing GNU systems. It's always
89good to use single runtime on a system, mixing runtimes can cause complications during 89good to use single runtime on a system, mixing runtimes can cause complications during
90compilation as well as runtime. However, its upto distribution policies to decide which runtime 90compilation as well as runtime. However, it's up to distribution policies to decide which runtime
91to use. 91to use.
92 92
93# Adding clang in generated SDK toolchain 93# Adding clang in generated SDK toolchain
94 94
95clang based cross compiler is not included into the generated SDK using `bitbake meta-toolchain` or 95Clang based cross compiler is not included into the generated SDK using `bitbake meta-toolchain` or
96`bitbake -cpopulate_sdk <image>` if clang is expected to be part of SDK, add `CLANGSDK = "1"` 96`bitbake -cpopulate_sdk <image>` if clang is expected to be part of SDK, add `CLANGSDK = "1"`
97in `local.conf` 97in `local.conf`
98 98
@@ -124,7 +124,7 @@ TOOLCHAIN:pn-<recipe> = "gcc"
124 124
125and OE will start using gcc to cross compile that recipe. 125and OE will start using gcc to cross compile that recipe.
126 126
127if a component does not build with libc++, you can add it to `conf/nonclangable.inc` e.g. 127If a component does not build with libc++, you can add it to `conf/nonclangable.inc` e.g.
128 128
129```shell 129```shell
130CXX:remove:pn-<recipe>:toolchain-clang = " -stdlib=libc++ " 130CXX:remove:pn-<recipe>:toolchain-clang = " -stdlib=libc++ "
@@ -179,6 +179,6 @@ revision: HEAD
179# Contributing 179# Contributing
180 180
181You are encouraged to follow Github Pull request workflow 181You are encouraged to follow Github Pull request workflow
182to share changes and following commit message guidelines are recommended [OE patch guidelines](https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines) 182to share changes and following commit message guidelines are recommended: [OE patch guidelines](https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines).
183 183
184Layer Maintainer: [Khem Raj](<mailto:raj.khem@gmail.com>) 184Layer Maintainer: [Khem Raj](<mailto:raj.khem@gmail.com>)