diff options
| author | Robin Lee <cheeselee@fedoraproject> | 2018-03-03 16:27:36 +0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2018-03-03 02:00:11 -0800 |
| commit | 32305699e5de8ca806db0ba08dbf75bdbf85fe97 (patch) | |
| tree | 49d9578a9964eb027af76640fbce9b9ca0226587 /README.md | |
| parent | c87d0d3bcc60c08c4e757279329e3719c0e7e504 (diff) | |
| download | meta-clang-32305699e5de8ca806db0ba08dbf75bdbf85fe97.tar.gz | |
libcxx: Add settings to build with libcxx as default C++ standard library
Signed-off-by: Robin Lee <cheeselee@fedoraproject>
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 24 |
1 files changed, 23 insertions, 1 deletions
| @@ -39,6 +39,22 @@ you can select clang per package too by writing bbappends for them containing | |||
| 39 | TOOLCHAIN = "clang" | 39 | TOOLCHAIN = "clang" |
| 40 | ``` | 40 | ``` |
| 41 | 41 | ||
| 42 | # Default C++ Standard Library Switch | ||
| 43 | |||
| 44 | Note that by default libstdc++ will remain the default C++ standard library, however if you wish | ||
| 45 | libc++ to be the default one then set | ||
| 46 | |||
| 47 | ```python | ||
| 48 | TARGET_CXXFLAGS_append_toolchain-clang ?= " -stdlib=libc++ " | ||
| 49 | ``` | ||
| 50 | |||
| 51 | in local.conf. | ||
| 52 | You can select libc++ per package too by writing bbappends for them containing | ||
| 53 | |||
| 54 | ```python | ||
| 55 | TARGET_CXXFLAGS_append_toolchain-clang = " -stdlib=libc++ " | ||
| 56 | ``` | ||
| 57 | |||
| 42 | # Building | 58 | # Building |
| 43 | 59 | ||
| 44 | Below we build for qemuarm machine as an example | 60 | Below we build for qemuarm machine as an example |
| @@ -61,7 +77,13 @@ simply add it to conf/nonclangable.inc e.g. | |||
| 61 | TOOLCHAIN_pn-<recipe> = "gcc" | 77 | TOOLCHAIN_pn-<recipe> = "gcc" |
| 62 | ``` | 78 | ``` |
| 63 | 79 | ||
| 64 | and OE will start using gcc to cross compile that recipe, | 80 | and OE will start using gcc to cross compile that recipe. |
| 81 | |||
| 82 | And if a component does not build with libc++, you can add it to conf/nonclangable.inc e.g. | ||
| 83 | |||
| 84 | ```shell | ||
| 85 | TARGET_CXXFLAGS_remove_pn-<recipe>_toolchain-clang = " -stdlib=libc++ " | ||
| 86 | ``` | ||
| 65 | 87 | ||
| 66 | # Dependencies | 88 | # Dependencies |
| 67 | 89 | ||
