-
Notifications
You must be signed in to change notification settings - Fork 4k
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
[7.2.0] Cherry-picks for starlarkifying all repo rules #22133
Commits on Apr 25, 2024
-
aquery: interpret "//foo:bar" as "all configured targets with label /…
…/foo:bar" cquery acquired this behavior 4 years ago in unknown commit, but it was never ported to aquery. This fixes some potentially surprising behavior when multiple configured targets corresponding to the same label are present (see added test cases). RELNOTES: aquery: `//foo:bar` now means "all configured targets with label `//foo:bar`" instead of "choose an arbitrary configured target with label `//foo:bar`". This is in line with cquery behavior. PiperOrigin-RevId: 620091100 Change-Id: Ib5c5ee33e35fe7ac30bc31f703b119dec40185b7
Configuration menu - View commit details
-
Copy full SHA for 4555d1d - Browse repository at this point
Copy the full SHA 4555d1dView commit details -
Added `local_repository` and `new_local_repository` as Starlark repo rules under `@bazel_tools//tools/build_defs/repo:local.bzl`. They're drop-in replacements for their native counterparts. Work towards #18285. RELNOTES: The `local_repository` and `new_local_repository` repository rules are now available as Starlark rules under `@bazel_tools//tools/build_defs/repo:local.bzl`. They are drop-in replacements for their native counterparts, and can be used in module extensions. Closes #21681. PiperOrigin-RevId: 615926923 Change-Id: I0cc7355b011751da23f2a3aa189f120ef177e0fe
Configuration menu - View commit details
-
Copy full SHA for dd192e7 - Browse repository at this point
Copy the full SHA dd192e7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 41a3ba1 - Browse repository at this point
Copy the full SHA 41a3ba1View commit details -
Remove tests for legacy non-platforms Android builds.
PiperOrigin-RevId: 586091870 Change-Id: I372189e8f853845ddedcfd5eb79242cabaeac69a
Configuration menu - View commit details
-
Copy full SHA for 839c48a - Browse repository at this point
Copy the full SHA 839c48aView commit details -
Remove
--crosstool_top
from testsIt became no-op in e116bae PiperOrigin-RevId: 616176650 Change-Id: Ib3829f9446e6f2a3ecffb6b044d017d24f42a28b
Configuration menu - View commit details
-
Copy full SHA for 27e1b82 - Browse repository at this point
Copy the full SHA 27e1b82View commit details -
Stop using
--android_cpu
in tests.PiperOrigin-RevId: 617788535 Change-Id: I485211508ea9a24837b574e3bb48a7e0d25b11d7
Configuration menu - View commit details
-
Copy full SHA for 439caa2 - Browse repository at this point
Copy the full SHA 439caa2View commit details -
Fix C++ unit test to use C++ toolchains
BEGIN_PUBLIC Fix C++ unit test to use C++ toolchains This is preparation to make --incompatible_enable_cc_toolchain_resolution a no-op. All the unit tests need to work with the flag enabled. END_PUBLIC PiperOrigin-RevId: 586254632 Change-Id: I55452515e571f12eefa376718743b1f23cbdbde8
Configuration menu - View commit details
-
Copy full SHA for 988edce - Browse repository at this point
Copy the full SHA 988edceView commit details -
Make incompatible_enable_cc_toolchain_resolution a no-op in android_s…
…dk_integration_test PiperOrigin-RevId: 588363296 Change-Id: I8af466628ce9c8d9175533255faef36968570aa4
Configuration menu - View commit details
-
Copy full SHA for be90874 - Browse repository at this point
Copy the full SHA be90874View commit details -
remove fat_apk_usage from blaze
PiperOrigin-RevId: 615086311 Change-Id: I349c25de5561d4b27ec35391445b7d4a0714fe54
Configuration menu - View commit details
-
Copy full SHA for 1acd1f6 - Browse repository at this point
Copy the full SHA 1acd1f6View commit details -
Remove
--host_crosstool_top
and--crosstool_top
from testsThey became no-op in e116bae PiperOrigin-RevId: 615817205 Change-Id: Id40a92daa1c1c7044f5e8618ff8f43345ecc0725
Configuration menu - View commit details
-
Copy full SHA for 2328206 - Browse repository at this point
Copy the full SHA 2328206View commit details -
Replace
--cpu
usages with--platforms
in testsPiperOrigin-RevId: 616992341 Change-Id: I6bbc763e85f5b2e6376179098e359a2361f18c6b
Configuration menu - View commit details
-
Copy full SHA for df2b9df - Browse repository at this point
Copy the full SHA df2b9dfView commit details -
Use the
host_platform
from@platforms
in Bazel* Upgrade to `platforms` 0.0.9 * `--host_platform` now defaults to `@bazel_tools//tools:host_platform`, which is an alias of `@platforms//host` * `local_config_platform` (the repo rule) now just outputs a thin wrapper; `@local_config_platform//:host` is an alias of `@platforms//host`, and `@local_config_platform//:constraints.bzl` re-exports `@platforms//host:constraints.bzl` * Removed all test mocks of `local_config_platform`. A follow-up will guard prod usage behind a flag. Work towards #8766 and #18285. PiperOrigin-RevId: 620316973 Change-Id: I6593f62569f31faee69e88a520a0f7f42009e05d
Configuration menu - View commit details
-
Copy full SHA for 1bb00bc - Browse repository at this point
Copy the full SHA 1bb00bcView commit details -
Forcibly use the bundled version of
@platforms
for loading the host…… platform repo rule #21877 happened because, even though we define `@platforms` to be the bundled version shipped with Bazel (which is 0.0.9 on HEAD), people tend to define their own versions of `@platforms` in WORKSPACE. If this ends up being a lower version (very likely), the subsequent `load` to use the `host_platform_repo` repo rule (which is a Starlark version of `local_config_platform`) will fail because that repo rule was only introduced in `platforms` version 0.0.9. To resolve this conundrum, we define a new repo `@internal_platforms_do_not_use` that _also_ points to the bundled version of `@platforms`. Nobody is likely to define this repo, so we can fairly reliably get the Starlark repo rule, and also still allow people to override the actual `@platforms` targets they use. This only affects WORKSPACE users; if `--enable_bzlmod` is set, the `@host_platform` seen by `@bazel_tools` will come from the module extension instead. Work towards #18285. Fixes #21877. Closes #21902. PiperOrigin-RevId: 622238362 Change-Id: I6335ab1bc26ba9ef54473d8a21fc5a8510a3ace5
Configuration menu - View commit details
-
Copy full SHA for 67c3255 - Browse repository at this point
Copy the full SHA 67c3255View commit details -
Force
local_config_platform
to redirect to the bundled platforms repoSimilar to 77469e0, we redirect the redirects/aliases generated by `local_config_plaform` to the bundled platforms repo (`@internal_platforms_do_not_use`) if Bzlmod is not enabled. Same for the `@bazel_tools//tools:host_platform` alias. Fixes #21877. Closes #22021. PiperOrigin-RevId: 625613724 Change-Id: I17940e5d4fbd8a7690d9199f80b80ceb62b53d1a
Configuration menu - View commit details
-
Copy full SHA for 9b35e10 - Browse repository at this point
Copy the full SHA 9b35e10View commit details -
Configuration menu - View commit details
-
Copy full SHA for 526d9fa - Browse repository at this point
Copy the full SHA 526d9faView commit details -
Add new flag
--incompatible_disable_native_repo_rules
This new flag defaults to `false`. When set to `true`, native repo rules cannot be used in WORKSPACE; their Starlark counterparts must be used. Native repo rules already can't be used in Bzlmod. Work towards #18285. Closes #21913. PiperOrigin-RevId: 626410163 Change-Id: I4981cd8d99fc87d0d0b66991e563941478b40f12
Configuration menu - View commit details
-
Copy full SHA for 2d50139 - Browse repository at this point
Copy the full SHA 2d50139View commit details -
Revert
android_sdk_repository
to usinglocal_config_platform
The native repo rule `android_sdk_repository` used to load from `@local_config_platform//:constraints.bzl`; 74c8ca4 changed it to load from `@platforms//host:constraints.bzl`. This caused failures with WORKSPACE users, as `@platforms` might still refer to an old version of `platforms` which doesn't have the `host` package, even though `@local_config_platform` knows to redirect to the bundled, newer version of `platforms`. This CL reverts that change, so `android_sdk_repository` now loads from `@local_config_platform` again. This is fine because both are native repo rules and will be deprecated at the same time. Partially fixes #21877. PiperOrigin-RevId: 627395814 Change-Id: I5761cde3c86190d6da3e3933aa1bef18e0dcca3e
Configuration menu - View commit details
-
Copy full SHA for 48bd6d7 - Browse repository at this point
Copy the full SHA 48bd6d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for f0d328b - Browse repository at this point
Copy the full SHA f0d328bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 766c4ba - Browse repository at this point
Copy the full SHA 766c4baView commit details -
Expose a single public method getToolchain(RuleContext) from CppHelper. Before several methods public methods were exposed and those were hard to follow. The new method covers both cases C++ toolchain resolution enabled or disabled. Add toolchain to StarlarkCcCommonTest. Because the new method only uses toolchains (not legacy attributes) when toolchain resolution is enabled. This is a preparation to remove incompatible_enable_cc_toolchain_resolution. PiperOrigin-RevId: 584856533 Change-Id: I6dec785e000b20d4aa26be93686fd5fdbad8ff76
Configuration menu - View commit details
-
Copy full SHA for 03ca07b - Browse repository at this point
Copy the full SHA 03ca07bView commit details