mirror of
https://github.com/ankitects/anki.git
synced 2026-01-10 12:33:55 -05:00
Anki's build scripts (ninja) set CARGO_TARGET_DIR for their own execution. But, when running cargo commands directly (like cargo check), those commands don't inherit that environment variable and use the default target/ directory instead, leading to duplicate builds. After this change, all cargo commands (check, build, test, etc.) will use the same cache, saving storage space.
18 lines
633 B
TOML
18 lines
633 B
TOML
[env]
|
|
STRINGS_PY = { value = "out/pylib/anki/_fluent.py", relative = true }
|
|
STRINGS_TS = { value = "out/ts/lib/generated/ftl.ts", relative = true }
|
|
DESCRIPTORS_BIN = { value = "out/rslib/proto/descriptors.bin", relative = true }
|
|
# build script will append .exe if necessary
|
|
PROTOC = { value = "out/extracted/protoc/bin/protoc", relative = true }
|
|
PYO3_NO_PYTHON = "1"
|
|
MACOSX_DEPLOYMENT_TARGET = "11"
|
|
PYTHONDONTWRITEBYTECODE = "1" # prevent junk files on Windows
|
|
|
|
[term]
|
|
color = "always"
|
|
|
|
[target.'cfg(all(target_env = "msvc", target_os = "windows"))']
|
|
rustflags = ["-C", "target-feature=+crt-static"]
|
|
|
|
[build]
|
|
target-dir = "out/rust"
|