Skip to content

Commit 971e8bb

Browse files
authored
Merge pull request #12 from Alexhuszagh/intel_sde
Support `x86_64-unknown-linux-gnu` with a runner using Intel SDE emulation.
2 parents 9685bc3 + 0070258 commit 971e8bb

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ The image names don't map identically to the target names, to avoid conflicting
4848
| thumbv7neon-unknown-linux-musleabihf | thumbv7neon-unknown-linux-musleabihf-cross |
4949
| x86_64-apple-darwin | x86_64-apple-darwin-cross |
5050
| x86_64-pc-windows-msvc | x86_64-pc-windows-msvc-cross |
51+
| x86_64-unknown-linux-gnu | x86_64-unknown-linux-gnu-sde-cross |
5152

5253
For example, to build and run an image, you would configure the image with:
5354

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM ubuntu:20.04
2+
ARG DEBIAN_FRONTEND=noninteractive
3+
4+
COPY common.sh lib.sh /
5+
RUN /common.sh
6+
7+
COPY cmake.sh /
8+
RUN /cmake.sh
9+
10+
COPY xargo.sh /
11+
RUN /xargo.sh
12+
13+
COPY cross-toolchains/docker/intel-sde.sh /
14+
RUN /intel-sde.sh
15+
16+
ENV CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER="/opt/intel/sde64 -rtm_mode full --"

docker/intel-sde.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env bash
2+
# Adapted from rust-lang/rust x86_64-unknown-linux-gnu-emulated's Dockerfile.
3+
# Commit 2d1e0750792
4+
5+
set -x
6+
set -euo pipefail
7+
8+
# shellcheck disable=SC1091
9+
. lib.sh
10+
11+
main() {
12+
local filename="sde-external-8.35.0-2019-03-11-lin.tar.bz2"
13+
local url="https://github.com/gnzlbg/intel_sde/raw/master/${filename}"
14+
15+
install_packages \
16+
bzip2 \
17+
curl \
18+
tar
19+
20+
local td
21+
td="$(mktemp -d)"
22+
23+
pushd "${td}"
24+
curl --retry 3 -sSfL "${url}" -O
25+
mkdir -p "/opt/intel"
26+
tar -C "/opt/intel" --strip-components=1 -xjf "${filename}"
27+
28+
purge_packages
29+
30+
popd
31+
32+
rm -rf "${td}"
33+
rm -rf "${0}"
34+
}
35+
36+
main "${@}"

0 commit comments

Comments
 (0)