mirror of
https://github.com/quintusl/rust-socksd.git
synced 2026-11-15 00:15:03 +00:00
Add .cargo/config.toml for better deb build.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
[source.crates-io]
|
||||
index = "https://github.com/rust-lang/crates.io-index" # I set the source to the official github index
|
||||
|
||||
[http]
|
||||
proxy = "" # leaving this as a blank string resets proxy to default
|
||||
|
||||
[target.aarch64-unknown-linux-gnu]
|
||||
arch = "arm64"
|
||||
linker = "aarch64-linux-gnu-gcc"
|
||||
rustflags = ["-C", "target-feature=+crt-static"]
|
||||
|
||||
[target.armv7-unknown-linux-gnueabihf]
|
||||
arch = "armhf"
|
||||
linker = "/opt/rpi_tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc"
|
||||
rustflags = ["-C", "target-feature=+crt-static"]
|
||||
@@ -138,16 +138,6 @@ jobs:
|
||||
rustup target add ${{ matrix.target }}
|
||||
rustup -q update
|
||||
|
||||
- name: Configure linker for cross-compilation (for ARM)
|
||||
if: matrix.linker != '' && matrix.linker != null
|
||||
run: |
|
||||
mkdir -p .cargo
|
||||
echo '[target.${{ matrix.target }}]' > .cargo/config.toml
|
||||
echo 'linker = "${{ matrix.linker }}"' >> .cargo/config.toml
|
||||
echo 'rustflags = ${{ matrix.rustflags }}' >> .cargo/config.toml
|
||||
echo "Configured .cargo/config.toml for ${{ matrix.target }}:"
|
||||
cat .cargo/config.toml
|
||||
|
||||
- name: Build Debian package for ${{ matrix.arch }}
|
||||
if: matrix.arch != 'armhf' && matrix.arch != 'arm64'
|
||||
run: dpkg-buildpackage -b -d -uc -us --host-arch ${{ matrix.arch }}
|
||||
|
||||
Reference in New Issue
Block a user