Skip to content

Commit 2f10057

Browse files
committed
Proper steps to create standalone toolchains with C++ STL (issue #4)
1 parent 0d7848e commit 2f10057

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

README.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,6 @@ If nothing is specified, it will build all of them.
9696
When building the toolchain for Windows, add `--host windows`
9797
(or `--host windows64` for 64-bit).
9898

99-
**Note:** If you want to build **standalone toolchains**
100-
(i.e. you're not using `ndk-build`), there is one extra step.
101-
In `toolchain/gcc/build-gcc.sh`, comment out two lines:
102-
```
103-
run rm -rf "$TOOLCHAIN_INSTALL_PATH/sysroot"
104-
```
105-
and
106-
```
107-
rm -rf $TOOLCHAIN_INSTALL_PATH/sysroot
108-
```
109-
11099
#### Other targets / hosts
111100

112101
When building the **x86 or x86_64 toolchains**, additional changes are
@@ -128,12 +117,17 @@ Insntype adr_insn = adrp_insn & ((1u << 31) - 1);
128117

129118
### Deploying
130119

131-
If you built a standalone toolchain, just extract the archive. You'll probably
132-
want to add `$(TOOLCHAIN)/bin` to your path.
120+
The generated toolchain are not standalone as few includes are packaged.
121+
This is because NDK lets you choose which platform version and which STL
122+
you want to use.
133123

134-
Otherwise, to allow `ndk-build` to use your new toolchain, extract the archive
135-
under `ndk/toolchains/$(TOOLCHAIN)/prebuilt/$(HOST_ARCH)`. Don't forget to back up
136-
the toolchain that was already packaged with the NDK.
124+
To allow `ndk-build` to use your new toolchain, extract the archive
125+
under `ndk/toolchains/$(TOOLCHAIN)/prebuilt/$(HOST_ARCH)`.
126+
Don't forget to back up the toolchain that was already packaged with the NDK.
137127

138128
For instance, on Linux x86_64 for the AArch64 toolchain, unpack the archive as
139129
`ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64`.
130+
131+
If you want to create a **standalone toolchains** (i.e. you're not
132+
using `ndk-build`), do the previous step, and then follow
133+
[this guide](https://developer.android.com/ndk/guides/standalone_toolchain.html).

0 commit comments

Comments
 (0)