Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extra_rustc_flag and extra_exec_rustc_flag #1413

Merged
merged 11 commits into from
Jul 12, 2022

Conversation

mypmc
Copy link

@mypmc mypmc commented Jun 15, 2022

Retake of #1407.
Each new flags are singular, and appended after the flags passed to plural ones.

Use case:

build --@rules_rust//:extra_rustc_flags="-C...,-C...,-Z..."

build:dev --@rules_rust//:extra_rustc_flag="-C..."
build:dev --@rules_rust//:extra_rustc_flag="-C..."

build:test --config=dev
build:test --@rules_rust//:extra_rustc_flag="-C..."

build:fuzz --config=test
build:fuzz --@rules_rust//:extra_rustc_flag="-C..."
build:fuzz --@rules_rust//:extra_rustc_flag="-C..."
build:fuzz --@rules_rust//:extra_rustc_flag="-Z..."

@krasimirgg
Copy link
Collaborator

How are we going to deal with the Min Bazel version failing CIs again?

@mypmc
Copy link
Author

mypmc commented Jun 22, 2022

How are we going to deal with the Min Bazel version failing CIs again?

PR for it. #1414

@mypmc mypmc requested a review from krasimirgg June 22, 2022 07:56
@krasimirgg
Copy link
Collaborator

How are we going to deal with the Min Bazel version failing CIs again?

PR for it. #1414

Perfect! I believe we'll need to land that first, otherwise we won't be able to push this with ongoing failing buildbots.

@mypmc mypmc force-pushed the mypmc/extra-rustc-flag branch from 2216848 to 28f5f01 Compare June 25, 2022 15:32
@mypmc mypmc changed the title Add singular variants to extend rustc flags Add extra_rustc_flag and extra_exec_rustc_flag Jun 25, 2022
@mypmc
Copy link
Author

mypmc commented Jul 7, 2022

@krasimirgg ping; what should I do next??

@@ -102,9 +104,15 @@ capture_clippy_output = _capture_clippy_output
error_format = _error_format
# See @rules_rust//rust/private:rustc.bzl for a complete description.

extra_rustc_flag = _extra_rustc_flag
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can yo make sure the new flags are added to docs? You should only need to update https://github.com/bazelbuild/rules_rust/blob/0.6.0/docs/symbols.bzl and https://github.com/bazelbuild/rules_rust/blob/0.6.0/docs/BUILD.bazel#L46-L60. Then CI will tell you to run ./docs/update_docs.sh from the root of the repo.

rust/private/rust.bzl Outdated Show resolved Hide resolved
@mypmc mypmc force-pushed the mypmc/extra-rustc-flag branch from 6252b21 to 37a39e1 Compare July 10, 2022 03:10
@mypmc mypmc requested a review from UebelAndre July 10, 2022 09:49
Copy link
Collaborator

@krasimirgg krasimirgg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest version looks good.

@krasimirgg krasimirgg merged commit 03d1d5e into bazelbuild:main Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants