File tree Expand file tree Collapse file tree
os/mkosi/components/dstack-rust Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,7 +27,9 @@ if [[ ${DSTACK_SKIP_RUST:-0} != 1 ]]; then
2727 export CARGO_INCREMENTAL=0 CARGO_NET_OFFLINE=${CARGO_NET_OFFLINE:- false}
2828 build_root=$( dirname " $DEST " )
2929 export CARGO_TARGET_DIR=" $build_root /dstack-cargo-target"
30- export RUSTFLAGS=" ${RUSTFLAGS:- } --remap-path-prefix=$ROOT =/usr/src/dstack --remap-path-prefix=$build_root =/usr/src/dstack-build -C strip=debuginfo"
30+ # A single codegen unit avoids LLVM partition/scheduling differences across
31+ # hosts with different CPU counts while retaining parallel crate builds.
32+ export RUSTFLAGS=" ${RUSTFLAGS:- } --remap-path-prefix=$ROOT =/usr/src/dstack --remap-path-prefix=$build_root =/usr/src/dstack-build -C codegen-units=1 -C strip=debuginfo"
3133 cargo build --locked --release --manifest-path " $ROOT /dstack/Cargo.toml" \
3234 -p dstack-guest-agent -p dstack-util
3335 install -m0755 " $CARGO_TARGET_DIR /release/dstack-guest-agent" \
You can’t perform that action at this time.
0 commit comments