Skip to content

Commit 9b20428

Browse files
committed
fixes from review
1 parent 52a6b8d commit 9b20428

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

compiler/rustc_target/src/spec/targets/hexagon_qurt.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,19 @@ pub(crate) fn target() -> Target {
77
Target {
88
llvm_target: "hexagon-unknown-elf".into(),
99
metadata: TargetMetadata {
10-
description: Some("Hexagon QuRT (Qualcomm Real-Time OS)".into()),
10+
description: Some("Hexagon QuRT".into()),
1111
tier: Some(3),
1212
host_tools: Some(false),
13-
std: Some(true),
13+
std: Some(false),
1414
},
1515
pointer_width: 32,
1616
data_layout: "\
1717
e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32\
1818
:32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-v32\
1919
:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048\
20-
:2048:2048".into()
21-
.into(),
20+
:2048:2048"
21+
.into()
22+
.into(),
2223
arch: "hexagon".into(),
2324
options: TargetOptions {
2425
os: "qurt".into(),

src/doc/rustc/src/platform-support.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ target | std | host | notes
314314
`csky-unknown-linux-gnuabiv2hf` | ✓ | | C-SKY abiv2 Linux, hardfloat (little endian)
315315
[`hexagon-unknown-linux-musl`](platform-support/hexagon-unknown-linux-musl.md) | ✓ | | Hexagon Linux with musl 1.2.3
316316
[`hexagon-unknown-none-elf`](platform-support/hexagon-unknown-none-elf.md)| * | | Bare Hexagon (v60+, HVX)
317+
[`hexagon-qurt`](platform-support/hexagon-qurt.md)| * | | Hexagon QuRT
317318
[`i386-apple-ios`](platform-support/apple-ios.md) | ✓ | | 32-bit x86 iOS (Penryn) [^x86_32-floats-return-ABI]
318319
[`i586-unknown-netbsd`](platform-support/netbsd.md) | ✓ | | 32-bit x86 (original Pentium) [^x86_32-floats-x87]
319320
[`i586-unknown-redox`](platform-support/redox.md) | ✓ | | 32-bit x86 Redox OS (PentiumPro) [^x86_32-floats-x87]

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,15 @@ 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+
The [Hexagon SDK](https://softwarecenter.qualcomm.com/catalog/item/Hexagon_SDK) is
32+
required for building programs for this target.
33+
3134
## Linking
3235

3336
This target selects `rust-lld` by default. Another option to use is
3437
[eld](https://github.com/qualcomm/eld), which is also provided with
3538
[the opensource hexagon toolchain](https://github.com/quic/toolchain_for_hexagon)
36-
and the [Hexagon SDK](https://softwarecenter.qualcomm.com/catalog/item/Hexagon_SDK).
39+
and the Hexagon SDK.
3740

3841
## Building the target
3942

@@ -49,8 +52,8 @@ target = ["<target for your host>", "hexagon-qurt"]
4952
[target.hexagon-qurt]
5053
cc = "hexagon-clang"
5154
cxx = "hexagon-clang++"
52-
ranlib = "hexagon-ranlib"
53-
ar = "hexagon-ar"
55+
ranlib = "llvm-ranlib"
56+
ar = "llvm-ar"
5457
llvm-libunwind = 'in-tree'
5558
```
5659

@@ -71,7 +74,7 @@ configuration with additional linker flags:
7174

7275
```sh
7376
# Build a static executable for QuRT
74-
cargo build --target hexagon-qurt \
77+
cargo rustc --target hexagon-qurt -- \
7578
-C link-args="-static -nostdlib" \
7679
-C link-args="-L/opt/Hexagon_SDK/6.3.0.0/rtos/qurt/computev69/lib" \
7780
-C link-args="-lqurt -lc"
@@ -89,8 +92,8 @@ For shared libraries that can be dynamically loaded by QuRT applications:
8992

9093
```sh
9194
# Build a shared object for QuRT
92-
cargo build --target hexagon-qurt \
93-
--crate-type=cdylib \
95+
cargo rustc --target hexagon-qurt \
96+
--crate-type=cdylib -- \
9497
-C link-args="-shared -fPIC" \
9598
-C link-args="-L/opt/Hexagon_SDK/6.3.0.0/rtos/qurt/computev69/lib"
9699
```

0 commit comments

Comments
 (0)