Add x86_64-unknown-linux-ohos target
This complements the existing `aarch64-unknown-linux-ohos` and `armv7-unknown-linux-ohos` targets.
This commit is contained in:
parent
fe37f37e4b
commit
5d46bd995d
8 changed files with 79 additions and 10 deletions
|
|
@ -326,6 +326,7 @@ target | std | host | notes
|
|||
`x86_64-unknown-haiku` | ✓ | ✓ | 64-bit Haiku
|
||||
`x86_64-unknown-hermit` | ✓ | | HermitCore
|
||||
`x86_64-unknown-l4re-uclibc` | ? | |
|
||||
[`x86_64-unknown-linux-ohos`](platform-support/openharmony.md) | ✓ | | x86_64 OpenHarmony |
|
||||
[`x86_64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 64-bit OpenBSD
|
||||
`x86_64-uwp-windows-gnu` | ✓ | |
|
||||
`x86_64-uwp-windows-msvc` | ✓ | |
|
||||
|
|
|
|||
|
|
@ -71,6 +71,28 @@ exec /path/to/ohos-sdk/linux/native/llvm/bin/clang++ \
|
|||
"$@"
|
||||
```
|
||||
|
||||
`x86_64-unknown-linux-ohos-clang.sh`
|
||||
|
||||
```sh
|
||||
#!/bin/sh
|
||||
exec /path/to/ohos-sdk/linux/native/llvm/bin/clang \
|
||||
-target x86_64-linux-ohos \
|
||||
--sysroot=/path/to/ohos-sdk/linux/native/sysroot \
|
||||
-D__MUSL__ \
|
||||
"$@"
|
||||
```
|
||||
|
||||
`x86_64-unknown-linux-ohos-clang++.sh`
|
||||
|
||||
```sh
|
||||
#!/bin/sh
|
||||
exec /path/to/ohos-sdk/linux/native/llvm/bin/clang++ \
|
||||
-target x86_64-linux-ohos \
|
||||
--sysroot=/path/to/ohos-sdk/linux/native/sysroot \
|
||||
-D__MUSL__ \
|
||||
"$@"
|
||||
```
|
||||
|
||||
Future versions of the OpenHarmony SDK will avoid the need for this process.
|
||||
|
||||
## Building the target
|
||||
|
|
@ -98,6 +120,13 @@ cxx = "/path/to/armv7-unknown-linux-ohos-clang++.sh"
|
|||
ar = "/path/to/ohos-sdk/linux/native/llvm/bin/llvm-ar"
|
||||
ranlib = "/path/to/ohos-sdk/linux/native/llvm/bin/llvm-ranlib"
|
||||
linker = "/path/to/armv7-unknown-linux-ohos-clang.sh"
|
||||
|
||||
[target.x86_64-unknown-linux-ohos]
|
||||
cc = "/path/to/x86_64-unknown-linux-ohos-clang.sh"
|
||||
cxx = "/path/to/x86_64-unknown-linux-ohos-clang++.sh"
|
||||
ar = "/path/to/ohos-sdk/linux/native/llvm/bin/llvm-ar"
|
||||
ranlib = "/path/to/ohos-sdk/linux/native/llvm/bin/llvm-ranlib"
|
||||
linker = "/path/to/x86_64-unknown-linux-ohos-clang.sh"
|
||||
```
|
||||
|
||||
## Building Rust programs
|
||||
|
|
@ -116,6 +145,10 @@ linker = "/path/to/aarch64-unknown-linux-ohos-clang.sh"
|
|||
[target.armv7-unknown-linux-ohos]
|
||||
ar = "/path/to/ohos-sdk/linux/native/llvm/bin/llvm-ar"
|
||||
linker = "/path/to/armv7-unknown-linux-ohos-clang.sh"
|
||||
|
||||
[target.x86_64-unknown-linux-ohos]
|
||||
ar = "/path/to/ohos-sdk/linux/native/llvm/bin/llvm-ar"
|
||||
linker = "/path/to/x86_64-unknown-linux-ohos-clang.sh"
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue