-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a786e10
commit 16a4a7e
Showing
4 changed files
with
156 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# BUILD | ||
# ----- | ||
# Set build configurations for all targets. | ||
|
||
[build] | ||
## Use xargo when cross-compiling for targets without a pre-built | ||
## standard library. Prefer `build-std` for most targets. This | ||
## requires nightly. | ||
#xargo = true | ||
## Use `-Zbuild-std` when cross-compiling for targets without a | ||
## pre-built standard library. This overrides `xargo`: if enabled, | ||
## `xargo` will not be used. | ||
#build-std = true | ||
## Default target to build if the target is not provided via | ||
## `--target` or `CARGO_BUILD_TARGET`. | ||
#default-target = "x86_64-unknown-linux-gnu" | ||
## Additional commands to run prior to building the package. | ||
## These are translated into RUN commands to add to the Docker | ||
## image prior to running cross. | ||
#pre-build = [ | ||
# "dpkg --add-architecture $CROSS_DEB_ARCH", | ||
# "apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH" | ||
#] | ||
## A custom Dockerfile to use for all targets. This can be | ||
## provided as a struct or string. See below for a target | ||
## for the struct variant. Both pre-build hooks can a custom | ||
## Dockerfile can be provided: the pre-build hooks will be added | ||
## to the end of the Dockerfile. | ||
#dockerfile = "Dockerfile" | ||
# | ||
## BUILD ENVIRONMENT | ||
## ----------------- | ||
## Set the build environment for all targets. | ||
# | ||
#[build.env] | ||
## Volumes to be mounted, passed via the value of an environment | ||
## variable. These will be passed to the container both as | ||
## a mountpoint and an environment variable. For example, the | ||
## path to `VOL2_ARG` will be available as `$VOL2_ARG`, and | ||
## the path will be mounted at `/path/to/volume`. | ||
## A value for the environment variable containing the | ||
## path to the volume can provided. | ||
#volumes = ["VOL1_ARG", "VOL2_ARG=/path/to/volume"] | ||
## Environment variables to be passed through to the container. | ||
## A value for the environment variable can provided. | ||
#passthrough = ["VAR1_ARG", "VAR2_ARG=VALUE"] | ||
|
||
# TARGET | ||
# ------ | ||
# Set build configurations for a single target. These | ||
# values override those present in `[build]`. | ||
|
||
[target.aarch64-unknown-linux-gnu] | ||
xargo = false | ||
pre-build = [ | ||
"dpkg --add-architecture $CROSS_DEB_ARCH && apt-get update --fix-missing && apt-get install --assume-yes libxcb1-dev:$CROSS_DEB_ARCH libdbus-1-dev:$CROSS_DEB_ARCH pkg-config:$CROSS_DEB_ARCH", | ||
] | ||
|
||
[target.aarch64-unknown-linux-gnu.env] | ||
passthrough = ["PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig"] | ||
|
||
[target.x86_64-unknown-linux-gnu] | ||
xargo = false | ||
pre-build = [ | ||
"dpkg --add-architecture $CROSS_DEB_ARCH && apt-get update --fix-missing && apt-get install --assume-yes libxcb1-dev:$CROSS_DEB_ARCH libdbus-1-dev:$CROSS_DEB_ARCH pkg-config:$CROSS_DEB_ARCH", | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# BUILD | ||
# ----- | ||
# Set build configurations for all targets. | ||
|
||
#[build] | ||
## Use xargo when cross-compiling for targets without a pre-built | ||
## standard library. Prefer `build-std` for most targets. This | ||
## requires nightly. | ||
#xargo = true | ||
## Use `-Zbuild-std` when cross-compiling for targets without a | ||
## pre-built standard library. This overrides `xargo`: if enabled, | ||
## `xargo` will not be used. | ||
#build-std = true | ||
## Default target to build if the target is not provided via | ||
## `--target` or `CARGO_BUILD_TARGET`. | ||
#default-target = "x86_64-unknown-linux-gnu" | ||
## Additional commands to run prior to building the package. | ||
## These are translated into RUN commands to add to the Docker | ||
## image prior to running cross. | ||
#pre-build = [ | ||
# "dpkg --add-architecture $CROSS_DEB_ARCH", | ||
# "apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH" | ||
#] | ||
## A custom Dockerfile to use for all targets. This can be | ||
## provided as a struct or string. See below for a target | ||
## for the struct variant. Both pre-build hooks can a custom | ||
## Dockerfile can be provided: the pre-build hooks will be added | ||
## to the end of the Dockerfile. | ||
#dockerfile = "Dockerfile" | ||
# | ||
## BUILD ENVIRONMENT | ||
## ----------------- | ||
## Set the build environment for all targets. | ||
# | ||
#[build.env] | ||
## Volumes to be mounted, passed via the value of an environment | ||
## variable. These will be passed to the container both as | ||
## a mountpoint and an environment variable. For example, the | ||
## path to `VOL2_ARG` will be available as `$VOL2_ARG`, and | ||
## the path will be mounted at `/path/to/volume`. | ||
## A value for the environment variable containing the | ||
## path to the volume can provided. | ||
#volumes = ["VOL1_ARG", "VOL2_ARG=/path/to/volume"] | ||
## Environment variables to be passed through to the container. | ||
## A value for the environment variable can provided. | ||
#passthrough = ["VAR1_ARG", "VAR2_ARG=VALUE"] | ||
|
||
# TARGET | ||
# ------ | ||
# Set build configurations for a single target. These | ||
# values override those present in `[build]`. | ||
|
||
[target.aarch64-unknown-linux-gnu] | ||
# Disable xargo for only `aarch64-unknown-linux-gnu`. | ||
xargo = false | ||
# Also disable `build-std` for `aarch64-unknown-linux-gnu`, | ||
# since it already has a std library pre-built. | ||
#build-std = true | ||
# An optional runner to override the default runner, | ||
# for example, allowing the use of Qemu or a native | ||
# runner for binaries. Defaults to `qemu-user` for | ||
# non-native binaries, or `native` for native binaries. | ||
#runner = "qemu-user" | ||
# A custom Docker image for `cross` to execute the build | ||
# commands in. This image must be pre-built and will override | ||
# the pre-build hooks. | ||
#image = "repository:tag" | ||
# Additional commands to run prior to building the package. | ||
# These override the commands present in `[build]`: they | ||
# will not merge. | ||
#linker = "aarch64-linux-gnu-ld" | ||
pre-build = [ | ||
"dpkg --add-architecture $CROSS_DEB_ARCH && apt-get update --fix-missing && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH libxcb1-dev:$CROSS_DEB_ARCH libdbus-1-dev:$CROSS_DEB_ARCH pkg-config:$CROSS_DEB_ARCH && ln -s /usr/include/aarch64-linux-gnu/openssl/opensslconf.h /usr/include/openssl/opensslconf.h && ln -s /usr/include/aarch64-linux-gnu/openssl/configuration.h /usr/include/openssl/configuration.h && echo 'export LIBRARY_PATH=/usr/lib/aarch64-linux-gnu:$LIBRARY_PATH' >> /etc/profile && echo 'export LD_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu:$LD_LIBRARY_PATH' >> /etc/profile && . /etc/profile", | ||
# "dpkg --add-architecture $CROSS_DEB_ARCH", | ||
# "apt-get update && apt-get install --assume-yes openssl:$CROSS_DEB_ARCH libssl-dev:$CROSS_DEB_ARCH libxcb1-dev:$CROSS_DEB_ARCH libdbus-1-dev:$CROSS_DEB_ARCH", | ||
# "ln -s /usr/include/aarch64-linux-gnu/openssl/opensslconf.h /usr/include/openssl/opensslconf.h", | ||
] | ||
|
||
[target.aarch64-unknown-linux-gnu.env] | ||
passthrough = ["CROSS_DEBUG=true","PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig", "LIBRARY_PATH=/usr/lib/aarch64-linux-gnu", "LD_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters