mirror of
https://github.com/Steffo99/patched-porobot.git
synced 2024-12-23 01:54:22 +00:00
Fix compilation where BUILD = TARGET platform
This commit is contained in:
parent
6532748d6c
commit
1d91b2619d
1 changed files with 13 additions and 11 deletions
|
@ -21,6 +21,7 @@ RUN \
|
|||
mkdir .cargo && \
|
||||
echo '[net]' >> .cargo/config.toml && \
|
||||
echo 'git-fetch-with-cli = true' >> .cargo/config.toml && \
|
||||
if [ "${BUILDPLATFORM}" != "${TARGETPLATFORM}" ]; then \
|
||||
if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then \
|
||||
echo '[target.x86_64-unknown-linux-gnu]' >> .cargo/config.toml; \
|
||||
echo 'linker = "x86-64-linux-gnu-gcc"' >> .cargo/config.toml; \
|
||||
|
@ -32,6 +33,7 @@ RUN \
|
|||
if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then \
|
||||
echo '[target.armv7-unknown-linux-gnueabihf]' >> .cargo/config.toml; \
|
||||
echo 'linker = "arm-linux-gnueabihf-gcc"' >> .cargo/config.toml; \
|
||||
fi \
|
||||
fi
|
||||
|
||||
RUN rustup target add ${RUSTTARGET}
|
||||
|
|
Loading…
Reference in a new issue