`incompatible_use_unstable_no_codegen_for_pipelining`

Đang mở
#3,977 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
rust
Lĩnh vực
build-system

Hướng nghiên cứu

Bắt đầu bằng cách đọc PR #3870 và lần theo phần triển khai pipelined_compilation cũng như thiết lập incompatible_use_unstable_no_codegen_for_pipelining. Xác minh đường dẫn no-codegen/hollow-rlib và hành vi của RUSTC_BOOTSTRAP đối với cả các hành động metadata và full, sau đó xác nhận rằng thiết lập migration hoạt động như mô tả.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

pipelining

Summary

--@rules_rust//rust/settings:pipelined_compilation currently runs rustc --emit=metadata,link and kills the process when the .rmeta artifact is written. This is fragile (races rustc's output), doesn't match Buck2's implementation, and leaves dep-info/incremental steps unrun.

The new implementation runs rustc -Zno-codegen --emit=link=<path> to completion, producing a Buck2-style hollow rlib. Since -Zno-codegen is unstable, this requires RUSTC_BOOTSTRAP=1 on the pipelined actions (set automatically; must be set on both metadata and full actions because it participates in SVH).

See PR #3870.

Change

A new incompatible flag incompatible_use_unstable_no_codegen_for_pipelining has been introduced (defaulting to false) that switches the pipelining implementation to -Zno-codegen/hollow-rlib and sets RUSTC_BOOTSTRAP=1 on pipelined actions.

Only has an effect when pipelined_compilation is also enabled.

Migration

Opt in with:

--@rules_rust//rust/settings:incompatible_use_unstable_no_codegen_for_pipelining=true

If you cannot adopt RUSTC_BOOTSTRAP=1, leave this flag false until the old path is removed, or disable pipelined_compilation.

Ngôn ngữ chính
Starlark
Star
857
Fork
701
Merge trung bình
4 ngày 7 giờ
Pull request đã merge (30 ngày)
46

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của bazelbuild/rules_rust

Tất cả issue của bazelbuild/rules_rust

Issue tương tự

Thêm issue về Build System

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.