From a89f5740ba4c9d52251c8ec144c84fbe52272137 Mon Sep 17 00:00:00 2001 From: Syntax <2079305+TheUltDev@users.noreply.github.com> Date: Thu, 28 Apr 2022 20:56:31 -0500 Subject: [PATCH] Fix builds on M1 (#54) --- .cargo/config.toml | 8 +++++++- CONTRIBUTING.md | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index ba19587f5..578d0c9f6 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,8 @@ [alias] -prisma = "run -p prisma-cli --" \ No newline at end of file +prisma = "run -p prisma-cli --" + +[target.x86_64-apple-darwin] +rustflags = [ + "-C", "link-arg=-undefined", + "-C", "link-arg=dynamic_lookup", +] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 95ec7fb5e..77e958284 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,6 +35,8 @@ Scan through our [existing issues](https://github.com/github/docs/issues) to fin This project uses [Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) and [pnpm](https://pnpm.io/installation). Ensure you have them installed before continuing. +> Note: MacOS M1 users should choose the customize option in the rustup init script and enter `x86_64-apple-darwin` as the default host triple instead of the default `aarch64-apple-darwin` + - `$ git clone https://github.com/spacedriveapp/spacedrive` - For Linux or MacOS users run: `chmod +x ./.github/scripts/setup-system.sh && ./.github/scripts/setup-system.sh` - This will install FFMPEG and any other required dependencies for Spacedrive to build.