Skip to content

Commit ac1485f

Browse files
committed
Rename hexagon-unknown-qurt => hexagon-qurt
Discsussion with compiler team converged on "hexagon-qurt" as a target name. Also: describe the available linkers.
1 parent 9d114dc commit ac1485f

File tree

4 files changed

+23
-17
lines changed

4 files changed

+23
-17
lines changed

compiler/rustc_target/src/spec/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1487,7 +1487,7 @@ supported_targets! {
14871487
("mips64el-unknown-linux-muslabi64", mips64el_unknown_linux_muslabi64),
14881488
("hexagon-unknown-linux-musl", hexagon_unknown_linux_musl),
14891489
("hexagon-unknown-none-elf", hexagon_unknown_none_elf),
1490-
("hexagon-unknown-qurt", hexagon_unknown_qurt),
1490+
("hexagon-qurt", hexagon_qurt),
14911491

14921492
("mips-unknown-linux-uclibc", mips_unknown_linux_uclibc),
14931493
("mipsel-unknown-linux-uclibc", mipsel_unknown_linux_uclibc),

src/doc/rustc/src/platform-support/hexagon-unknown-qurt.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# `hexagon-unknown-qurt`
1+
# `hexagon-qurt`
22

33
**Tier: 3**
44

55
Rust for Hexagon QuRT (Qualcomm Real-Time OS).
66

7-
| Target | Description |
8-
| -------------------- | -------------------------------------------- |
9-
| hexagon-unknown-qurt | Hexagon 32-bit QuRT (position independent) |
7+
| Target | Description |
8+
| -------------------- | ------------|
9+
| hexagon-qurt | Hexagon 32-bit QuRT |
1010

1111
## Target maintainers
1212

@@ -28,6 +28,13 @@ Functions marked `extern "C"` use the [Hexagon architecture calling convention](
2828
This target generates position-independent ELF binaries by default, making it
2929
suitable for both static images and dynamic shared objects.
3030

31+
## Linking
32+
33+
This target selects `rust-lld` by default. Another option to use is
34+
[eld](https://github.com/qualcomm/eld), which is also provided with
35+
[the opensource hexagon toolchain](https://github.com/quic/toolchain_for_hexagon)
36+
and the [Hexagon SDK](https://softwarecenter.qualcomm.com/catalog/item/Hexagon_SDK).
37+
3138
## Building the target
3239

3340
You can build Rust with support for the target by adding it to the `target`
@@ -37,9 +44,9 @@ list in `bootstrap.toml`:
3744
[build]
3845
build-stage = 1
3946
host = ["<target for your host>"]
40-
target = ["<target for your host>", "hexagon-unknown-qurt"]
47+
target = ["<target for your host>", "hexagon-qurt"]
4148

42-
[target.hexagon-unknown-qurt]
49+
[target.hexagon-qurt]
4350
cc = "hexagon-clang"
4451
cxx = "hexagon-clang++"
4552
ranlib = "hexagon-ranlib"
@@ -64,7 +71,7 @@ configuration with additional linker flags:
6471

6572
```sh
6673
# Build a static executable for QuRT
67-
cargo build --target hexagon-unknown-qurt \
74+
cargo build --target hexagon-qurt \
6875
-C link-args="-static -nostdlib" \
6976
-C link-args="-L/opt/Hexagon_SDK/6.3.0.0/rtos/qurt/computev69/lib" \
7077
-C link-args="-lqurt -lc"
@@ -82,7 +89,7 @@ For shared libraries that can be dynamically loaded by QuRT applications:
8289

8390
```sh
8491
# Build a shared object for QuRT
85-
cargo build --target hexagon-unknown-qurt \
92+
cargo build --target hexagon-qurt \
8693
--crate-type=cdylib \
8794
-C link-args="-shared -fPIC" \
8895
-C link-args="-L/opt/Hexagon_SDK/6.3.0.0/rtos/qurt/computev69/lib"
@@ -101,7 +108,7 @@ The target can be customized for different use cases:
101108
### For Static Images
102109
```toml
103110
# In .cargo/config.toml
104-
[target.hexagon-unknown-qurt]
111+
[target.hexagon-qurt]
105112
rustflags = [
106113
"-C", "link-args=-static",
107114
"-C", "link-args=-nostdlib",
@@ -112,7 +119,7 @@ rustflags = [
112119
### For Shared Objects
113120
```toml
114121
# In .cargo/config.toml
115-
[target.hexagon-unknown-qurt]
122+
[target.hexagon-qurt]
116123
rustflags = [
117124
"-C", "link-args=-shared",
118125
"-C", "link-args=-fPIC",
@@ -122,7 +129,7 @@ rustflags = [
122129

123130
## Testing
124131

125-
Since `hexagon-unknown-qurt` requires the QuRT runtime environment, testing requires
132+
Since `hexagon-qurt` requires the QuRT runtime environment, testing requires
126133
either:
127134
- Hexagon hardware with QuRT
128135
- `hexagon-sim`
@@ -132,9 +139,8 @@ either:
132139

133140
This target requires the proprietary [Hexagon SDK toolchain for C interoperability](https://softwarecenter.qualcomm.com/catalog/item/Hexagon_SDK):
134141

135-
- **SDK Path**: `/opt/Hexagon_SDK/6.3.0.0/`
142+
- **Sample SDK Path**: `/opt/Hexagon_SDK/6.3.0.0/`
136143
- **Toolchain**: Use `hexagon-clang` from the Hexagon SDK
137-
- **Headers**: QuRT and POSIX headers are automatically included
138144
- **Libraries**: Link against QuRT system libraries as needed
139145

140146
### C Interoperability Example

tests/assembly-llvm/targets/targets-elf.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,9 @@
232232
//@ revisions: hexagon_unknown_none_elf
233233
//@ [hexagon_unknown_none_elf] compile-flags: --target hexagon-unknown-none-elf
234234
//@ [hexagon_unknown_none_elf] needs-llvm-components: hexagon
235-
//@ revisions: hexagon_unknown_qurt
236-
//@ [hexagon_unknown_qurt] compile-flags: --target hexagon-unknown-qurt
237-
//@ [hexagon_unknown_qurt] needs-llvm-components: hexagon
235+
//@ revisions: hexagon_qurt
236+
//@ [hexagon_qurt] compile-flags: --target hexagon-qurt
237+
//@ [hexagon_qurt] needs-llvm-components: hexagon
238238
//@ revisions: i686_pc_nto_qnx700
239239
//@ [i686_pc_nto_qnx700] compile-flags: --target i686-pc-nto-qnx700
240240
//@ [i686_pc_nto_qnx700] needs-llvm-components: x86

0 commit comments

Comments
 (0)