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

Use constraints in global conditions instead of configuration flags. #12427

Closed

Conversation

comius
Copy link
Contributor

@comius comius commented Nov 6, 2020

I changed configuration settings in //src/conditions to use constraints instead of flags and then fixed some places where this is used.

I fixed uses of darwin and darwin_x86_64, which using flags I believe is the same thing and using constraints actually becomes different.

Added config_setting for linux. Used it where it makes sense. It cannot be used in tools/jdk/..., because it somehow gets new @bazel_tools and old @bazel_tools/constraints.

This might break users of remote execution or cross compiling. The users working on a single platform should be safe.

@google-cla google-cla bot added the cla: yes label Nov 6, 2020
@comius comius marked this pull request as ready for review November 6, 2020 19:58
@comius comius requested a review from katre November 6, 2020 19:59
@comius
Copy link
Contributor Author

comius commented Nov 6, 2020

Downstream test at https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1751 (previously failing gerrit, cloudrobotics, flatbuffers)

Copy link
Member

@katre katre left a comment

Choose a reason for hiding this comment

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

Nice to see the reduced duplication.

@comius
Copy link
Contributor Author

comius commented Nov 9, 2020

Downstream test at https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1751 (previously failing gerrit, cloudrobotics, flatbuffers)

rules_nodejs fix: bazel-contrib/rules_nodejs#2274
rules_docker fix: bazelbuild/rules_docker#1674

comius added a commit to comius/bazel that referenced this pull request Nov 9, 2020
(third_party/BUILD).

This is part of bazelbuild#12427, that
changes third_party/BUILD file.
"//src/conditions:linux_ppc": ["cpu_profiler_posix.cc"],
"//src/conditions:linux_s390x": ["cpu_profiler_posix.cc"],
"//src/conditions:linux_x86_64": ["cpu_profiler_posix.cc"],
"//src/conditions:linux": ["cpu_profiler_posix.cc"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice.

bazel-io pushed a commit that referenced this pull request Nov 9, 2020
…third_party/BUILD).

This is part of #12427, that
changes third_party/BUILD file.

Partial commit for third_party/*, see #12435.

Signed-off-by: Philipp Wollermann <philwo@google.com>
@comius comius force-pushed the use-constraints-in-conditions branch from 39324fb to 686e08d Compare November 9, 2020 15:51
@bazel-io bazel-io closed this in 6d637f4 Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants