@@ -28,12 +28,15 @@ Functions marked `extern "C"` use the [Hexagon architecture calling convention](
2828This target generates position-independent ELF binaries by default, making it
2929suitable 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
3336This 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 ]
5053cc = " hexagon-clang"
5154cxx = " hexagon-clang++"
52- ranlib = " hexagon -ranlib"
53- ar = " hexagon -ar"
55+ ranlib = " llvm -ranlib"
56+ ar = " llvm -ar"
5457llvm-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