Commit Graph

577 Commits

Author SHA1 Message Date
Fabian Meumertzheim b8cd815963 Fix CI 2024-11-05 15:07:31 +01:00
Fabian Meumertzheim 885d333d55 Switch to new include path and namespace 2024-11-05 14:57:08 +01:00
Fabian Meumertzheim 82e44f3c47 Copy over runfiles library from Bazel
The runfiles library can be maintained independently of Bazel releases and bazel_tools can refer to it via an alias.
2024-10-31 09:52:26 +01:00
Copybara-Service a5827bf372 Merge pull request #256 from fmeum:235-better-tool-map
PiperOrigin-RevId: 691529088
Change-Id: Idbda52a6b2eecbdefd83b2c89a0c7eb01dfee074
2024-10-30 13:15:53 -07:00
Googler b15fed2409 Remove cc_proto_library from defs.bzl
This makes it possible to remove dependency on protobuf. The dependency causes more problems than compatibility with some users of cc_proto_library from rules_cc.

Move WORKSPACE.bzlmod into correct directory.

PiperOrigin-RevId: 691445019
Change-Id: I45d7b4e381483de14ea2d20110be40f471a1ad12
2024-10-30 09:22:18 -07:00
Copybara-Service 597be676dd Merge pull request #234 from alexeagle:patch-2
PiperOrigin-RevId: 691379288
Change-Id: I4c48b399a3689caf2c0632856aa73180de4c5995
2024-10-30 05:18:29 -07:00
Copybara-Service 0d44d3ee76 Merge pull request #260 from hauserx:main
PiperOrigin-RevId: 691373476
Change-Id: I7a09129bdc7ac32bbbdb5f06a586bc0ceee2a8b7
2024-10-30 04:54:20 -07:00
Copybara-Service 0640261093 Merge pull request #257 from fmeum:validate-library
PiperOrigin-RevId: 691372917
Change-Id: Idebbc95f1e24990ec61d5224fbc28cd238a8fdbd
2024-10-30 04:51:22 -07:00
Copybara-Service 7381e24175 Merge pull request #198 from zaucy:emscripten-compiler
PiperOrigin-RevId: 691372690
Change-Id: I02e074a82591ba4112fe8449c0a7a86a35d64777
2024-10-30 04:49:48 -07:00
Copybara-Service faeafdb828 Merge pull request #253 from meteorcloudy:fix_compatibility
PiperOrigin-RevId: 689379342
Change-Id: Ia90576c00b917bf58a53362981d1f3e775d6dfd5
2024-10-24 07:51:08 -07:00
Googler f4e71c3a0c Update CODEOWNERS for rules_cc
PiperOrigin-RevId: 689375444
Change-Id: Ie4d9261f85290e25d76d634293bb7add9babea57
2024-10-24 07:37:56 -07:00
Googler f6c19dd20f Remove outdated toolchain README contents.
BEGIN_PUBLIC

Remove outdated toolchain README contents.

END_PUBLIC

PiperOrigin-RevId: 689365688
Change-Id: I78f3be0651e8aeaf842c3ea06d63161dd7ab42b4
2024-10-24 07:02:04 -07:00
Grzegorz Lukasik 7c39729245 Remove redundant with_feature_set for sanitizers
It uses the same name as the feature itself.
2024-10-23 10:52:47 +02:00
Googler 9e3e907560 Exclude intentionally broken build target from GH CI
BEGIN_PUBLIC

Exclude intentionally broken build target from GH CI

Gets GitHub CI passing again.

END_PUBLIC

PiperOrigin-RevId: 687335065
Change-Id: Icb3d9d1f7b6ccfd1e19c9174ad3481ecc2dfcc7f
2024-10-18 09:46:57 -07:00
Fabian Meumertzheim 12a8bd59af Move static library validation helper to `ar_files`
It doesn't need to be staged for every compile or link action. The action that uses it stages `all_files`.
2024-10-15 14:38:18 +02:00
Fabian Meumertzheim 3d51aaa430 Deduplicate tools for `cc_tool_map`
Fixes #235
2024-10-15 14:30:10 +02:00
Yun Peng f7ca57feac Restore compatibility with Bazel 6 2024-10-11 18:23:48 +02:00
Googler ba3ec91a55 Enable cquery in GitHub CI
BEGIN_PUBLIC

Enable cquery in GitHub CI

This will prevent incompatible targets from being built and tested.

END_PUBLIC

PiperOrigin-RevId: 684771349
Change-Id: Iba8807531e2c5465f1378bc384359be439373bf6
2024-10-11 03:15:37 -07:00
Googler ae44550707 Add missing defaults for cc_toolchain
BEGIN_PUBLIC

Add missing defaults for cc_toolchain

Fixes breakage caused by fully enumerating known attributes of a cc_toolchain without providing default values for optional arguments.

END_PUBLIC

PiperOrigin-RevId: 684719429
Change-Id: I8d031a344a65218fc925025cfef7768d123ad879
2024-10-10 23:37:00 -07:00
Googler 4a2d37625b Bump rules_cc version to 0.0.13
PiperOrigin-RevId: 684052002
Change-Id: I91de575a1ad021297787d00f9f95f0d569d9a5d8
2024-10-09 08:46:16 -07:00
Googler 324612d107 Add documentation for `cc_toolchain`
BEGIN_PUBLIC

Add documentation for `cc_toolchain`

Updates and includes documentation for the `cc_toolchain` rule, fixing some minor typos along the way.

END_PUBLIC

PiperOrigin-RevId: 684051451
Change-Id: I5bb62f22b3fb68e2d233fb85255d1a86bb45a47d
2024-10-09 08:44:04 -07:00
Googler 56f4a8bfa1 Add testing for Bazel@HEAD and Bazel 6
PiperOrigin-RevId: 684046113
Change-Id: I98875f8c67b491759f121c21e33ed04ec1d590e0
2024-10-09 08:26:06 -07:00
Copybara-Service 7782be6db1 Merge pull request #237 from armandomontanez:rules-based-toolchain-example
PiperOrigin-RevId: 684024413
Change-Id: I36767bb7452d83749a48342ff447f792979da576
2024-10-09 07:10:20 -07:00
Googler 013a082858 Redirect cc_proto_library to protobuf
PiperOrigin-RevId: 683876696
Change-Id: I0444b3b3bc3ac67bb641d82fe1d67117a6e2bcae
2024-10-08 21:18:29 -07:00
Googler a2949e206e Fix toolchain argument ordering
BEGIN_PUBLIC

Fix argument ordering

Expected argument ordering should be:

1. Arguments listed in `args`.
2. Legacy/built-in features.
3. User-defined features.

Due to some implementation changes, user-defined arguments were being applied last, reducing the ability for features to properly toggle behaviors dynamically.

This also fixes an issue caught by this change where cc_sysroot was applying flags to actions that had no associated action config.

END_PUBLIC

PiperOrigin-RevId: 683677895
Change-Id: I60e25ca22ffefce717e4e5ce476db0a070ca1993
2024-10-08 10:34:59 -07:00
Armando Montanez b82c650543 Merge branch 'main' into rules-based-toolchain-example 2024-10-08 10:12:35 -07:00
Googler eeed2a9ab7 Remove crostool migration tools
The migration to .bzl configured toolchains happened a long time ago and the conversion tools from proto files are not needed anymore.

This also cleans up rules_cc dependencies to build those tools. And unblock me around the import of py_proto_library, which is not needed anymore.

PiperOrigin-RevId: 683582749
Change-Id: I9a56d9e3f9089f7434708a2cfefdd4f12d186658
2024-10-08 05:35:42 -07:00
Googler b96ca29763 Directly exposing functions in toolchain_config_utils.bzl
setup_vc_env_vars should accepts more parameters than the wrapper previously allowed.

PiperOrigin-RevId: 683192260
Change-Id: Ie6063e0706640856e0f4c9dce3e1f4e8fe1ec9e9
2024-10-07 08:24:18 -07:00
Googler 19a278e626 Prepare for 0.0.12 release
PiperOrigin-RevId: 683189389
Change-Id: I6092c6d9716502cb236c307b9761d88a09b41334
2024-10-07 08:14:05 -07:00
Googler be5e15fc27 Prepare version 0.0.11 release
PiperOrigin-RevId: 683098220
Change-Id: I85a6ea0c63070e4a880a67f3063e1c2c4bef31ac
2024-10-07 02:36:13 -07:00
Copybara-Service aba461762f Merge pull request #250 from bazelbuild:Wyverald-patch-1
PiperOrigin-RevId: 683088860
Change-Id: I8aae0bbe569e834bc4d1d46dcee29c1c2ee51a64
2024-10-07 01:59:36 -07:00
Copybara-Service 37dacbbcf2 Merge pull request #249 from meteorcloudy:stardoc-dev
PiperOrigin-RevId: 683088422
Change-Id: Id6308c12494f4b591fd1d47ffbe84cb3b01b745d
2024-10-07 01:57:42 -07:00
Xùdōng Yáng 5cbd830262
Fix empty glob in cc/private/BUILD
the glob pattern `**/*.bzl` doesn't match anything there, and this is bad for `--incompatible_disallow_empty_glob`. This PR removes the offending line.
2024-10-04 22:54:53 +02:00
Fabian Meumertzheim 083ace4f11 Make stardoc a dev dependency
Otherwise rules_cc is transitively incompatible with Bazel 6 through the chain stardoc 0.7.0 -> rules_java 7.6.1.

`stardoc` targets are not needed by consumers of the ruleset.
2024-10-04 15:07:57 +02:00
Copybara-Service 7343c660a4 Merge pull request #244 from keith:ks/allow-extra-args-to-cc_sysroot
PiperOrigin-RevId: 682280945
Change-Id: I1f0256f6c99dd1e67efdcd08145700e10ab26e6a
2024-10-04 05:25:37 -07:00
Copybara-Service 565dbd65bd Merge pull request #245 from keith:ks/add-objc_compile-to-compile_actions
PiperOrigin-RevId: 682280777
Change-Id: If9c3a8aa883f7630d9a21d09e65c3c7a230140f2
2024-10-04 05:24:32 -07:00
Googler fd72f9e62a Fix rules_cc copybara
PiperOrigin-RevId: 682280542
Change-Id: Ie5f9dbc05f4d87dbe14b2392a21a23ef0c3ea9a4
2024-10-04 05:23:24 -07:00
Copybara-Service b1bea517b7 Merge pull request #240 from bazelbuild:comius-patch-1
PiperOrigin-RevId: 682269919
Change-Id: Iae32802a2d92a79f9791708dceeafc8b1fb51f10
2024-10-04 04:41:30 -07:00
Ivo List b6db47b84b Add bazel version 2024-10-04 13:28:28 +02:00
Ivo List 6a6e870a20 Fix url 2024-10-04 13:28:28 +02:00
Ivo List 85e02e42b3 Adding maintainers 2024-10-04 13:28:28 +02:00
Armando Montanez e8989401d5 Address more comments 2024-10-03 19:48:19 -07:00
Armando Montanez 4ac204f4ed Run buildifier 2024-10-03 10:27:34 -07:00
Armando Montanez 08752d184e Remove bzlmod lockfile in example 2024-10-03 10:12:56 -07:00
Armando Montanez ddbe1503eb Update ignore all bazel-generated dirs 2024-10-03 10:10:35 -07:00
Armando Montanez 09cd8eb3d6 Merge branch 'main' into rules-based-toolchain-example 2024-10-03 10:09:43 -07:00
Armando Montanez be2b2e94af Reorganize to address review feedback 2024-10-03 10:04:23 -07:00
Googler c2549f6eb0 Sync cc toolchain from Bazel's tools/cpp
- @bazel_tools//tools/cpp:toolchain_type is not moved.
- Added cc/toolchains/toolchain_config_utils.bzl for exposing util functions for cc toolchain configuration.

Closes https://github.com/bazelbuild/rules_cc/pull/247

Working towards https://github.com/bazelbuild/bazel/issues/23809

PiperOrigin-RevId: 681913803
Change-Id: I16ff456a212ab0e579c137bd74344255f4e49bd8
2024-10-03 09:32:38 -07:00
Googler f364500ba8 Create a concept of a tool capability.
This should make the concept of "sentinel features" work correctly with known_features and enabled_features, rather than enabling them directly in features.

PiperOrigin-RevId: 681688437
Change-Id: I29184a2079ccfd0eb3a275439508a66ca61109af
2024-10-02 19:56:22 -07:00
Armando Montanez dd9e124c92 Rename BUILD to BUILD.bazel
Indicate these build files only work with Bazel and not Blaze.
2024-10-02 17:00:28 -07:00