Commit Graph

93 Commits

Author SHA1 Message Date
Googler 7e5f6a9391 Remove defs.bzl usages
BEGIN_PUBLIC
Remove defs.bzl usages
END_PUBLIC

PiperOrigin-RevId: 693709660
Change-Id: I1c92999e23c153f865ad68ab802d907abaea74eb
2024-11-06 07:35:53 -08:00
Fabian Meumertzheim 3d51aaa430 Deduplicate tools for `cc_tool_map`
Fixes #235
2024-10-15 14:30:10 +02: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
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 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
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
Armando Montanez 19920b75ab Update package/license declarations 2024-10-02 16:02:51 -07:00
Armando Montanez c28b850603 Remove experimental_enable_rule_based_toolchains
Removes nonexistent flag.
2024-10-02 15:56:21 -07:00
Armando Montanez 72d3b34612 Remove unnecessary allowlist_include_directories 2024-10-02 15:54:03 -07:00
Armando Montanez c9a859abce Run buildifier 2024-09-09 08:36:30 -07:00
Armando Montanez c2c7987f55 Add copyright headers 2024-09-09 08:30:27 -07:00
Armando Montanez a79b9c4c4b Add presubmit 2024-09-06 11:14:48 -07:00
Armando Montanez 87a3dd9d0e Get toolchain working 2024-09-06 11:09:10 -07:00
Armando Montanez 2bdc5d9a6b Rule-based toolchain example 2024-09-06 11:08:58 -07:00
Googler fc88354c6f Automatic code cleanup.
PiperOrigin-RevId: 566245154
Change-Id: Id906c52da9c922cee77782994a63c6b1dc656fc8
2023-09-18 03:04:35 -07:00
Googler ad1830946d Remove redundant "# copybara-use-repo-external-label"
Remove redundant tags for copybara to replace labels with labels including the
repository, where there are no labels to substitute after 2f8c04c044.

PiperOrigin-RevId: 510103824
Change-Id: I9b65a6b7f9b48885aec4df5f4723273633be4860
2023-02-16 04:17:58 -08:00
Googler 2f8c04c044 Automatic code cleanup.
PiperOrigin-RevId: 456494185
Change-Id: I9aaefff0976cca2b68646970c8d4675c8e122d19
2022-06-22 06:02:29 -07:00
Christopher Peterson Sauer e0dad88a07 Move examples from deprecated @rules_cc//cc:find_cpp_toolchain -> @bazel_tools//tools/cpp:toolchain_utils.bzl 2022-04-11 16:38:30 -07:00
Christopher Peterson Sauer ab8b67a0ab Move examples from deprecated find_cpp_toolchain -> find_cc_toolchain 2022-04-05 23:58:12 -07:00
Googler 3eaa3c7f88 Remove unnecessary tests from rules_cc
They are now part of the bazelbuild/bazel repository.

Copies buildifier changes contributed by Keith in https://github.com/bazelbuild/rules_cc/pull/128

RELNOTES:none
PiperOrigin-RevId: 435312636
Change-Id: I4d5d2f58d90026c0cdfb5c0a90709de7c28c6ccd
2022-03-17 04:50:16 -07:00
Googler c460f83acb Include more information about configurations in cquery proto formatted outout
1. Add a repeated Configuration field to CqueryResult, and fill in the
checksum, platform, and mnemonic fields.

2. Add a configuration_id field to ConfiguredTarget, and deprecate the existing
configuration field in ConfiguredTarget. The configuration_id field is an index
that points to the Configuration message stored in CqueryResult, following the
same pattern as ActionGraphContainer. This avoids duplicating the same
Configuration message for each ConfiguredTarget.

RELNOTES: Include more information about configurations in cquery proto
formatted output. This deprecates the configuration field of
AnalysisProtosV2.ConfiguredTarget, and adds a new field, configuration_id, to
be used instead.
PiperOrigin-RevId: 429129916
Change-Id: Id048229a6872e6462b67cfe3041cdc907967d7bf
2022-03-17 04:50:09 -07:00
Googler 081771d4a0 Adds providers back temporarily until TF can use head
Adds back providers to cc_shared_library bzl file in rules_cc until TF is using
bazel from head and can use the builtin cc_shared_library version.

RELNOTES:none
PiperOrigin-RevId: 409136047
Change-Id: I53388c18bcbc555e8a3c7edbc5e54634375f051f
2021-11-11 06:50:45 -08:00
Googler 426f721323 Automatic code cleanup.
PiperOrigin-RevId: 407085810
Change-Id: I6cac435d8e0e89f97405c7b3923d1891da78740b
2021-11-02 08:13:14 -07:00
Googler f846566869 Update rules_cc doc references for inclusive-language-fixit-2
PiperOrigin-RevId: 405732925
Change-Id: If700320f2e8f3e45f2fbdf08e945ea94dfe32887
2021-10-26 14:16:20 -07:00
Googler aa7ff810cf Make cc_shared_library use the builtin Starlark version
Eventually, when we are ready to pull out all the other rules to an external
repository cc_shared_library will be moved with the others: cc_library,
cc_binary,...

RELNOTES:none
PiperOrigin-RevId: 401307125
Change-Id: I14f48a7753598eaa4269554e87351a70f75111c2
2021-10-06 12:12:31 -07:00
Googler 68cb652a71 mv BUILD --> BUILD.bazel
PiperOrigin-RevId: 373787065
Change-Id: Ic50705bb2d63b969e939e77150e877f82c2f0c69
2021-05-14 07:51:14 -07:00
Googler 8973704d88 Fix buildifier error in rules_cc
PiperOrigin-RevId: 373438035
Change-Id: I6ff9b0cca80cb5dc7aa597a0ce7fb63d345b1cd9
2021-05-12 13:24:12 -07:00
Copybara-Service 656e045167 Merge pull request #103 from limdor:buildifier_fix
PiperOrigin-RevId: 372517636
Change-Id: I65cae735170b4c017f63ae6fbfd1ec6500e258b0
2021-05-07 02:44:41 -07:00
Xavier Bonaventura 299fce788b Fix buildifier format issue 2021-05-03 20:12:34 +02:00
Copybara-Service c612c9581b Merge pull request #98 from gregestren:master
PiperOrigin-RevId: 366213902
Change-Id: I25281d0487aa1b66b3c81db0fbd723ce3640a49b
2021-04-01 02:45:57 -07:00
Googler 608c7b605f C++: Make permissions check optional in cc_shared_library
The cc_shared_library_permissions mechanism was introduced to add control over
which cc_shared_libraries can export a given cc_library. If the repo is big
enough, the owner of a cc_library might want to prevent someone else in a
different package making their library part of the ABI of a public shared
library because that makes it harder to change the cc_library. This does not
apply accross repositories because a dependant repository can overwrite
anything from a repository dependency anyway.

However, it is becoming more apparent than even though this mechanism should
exist, it should not be enabled by default since most people don't need it. To
enable it pass the flag --//examples:enable_permissions_check=True.

RELNOTES:none
PiperOrigin-RevId: 363171677
Change-Id: I8afb3294806bb3053ee1279c6e9c5355089bccbb
2021-03-16 06:45:21 -07:00
Googler 9544a3eeac Automatic code cleanup.
PiperOrigin-RevId: 362075479
Change-Id: Ib556b478b2e28fa6c35fe493b533035de4916bd0
2021-03-10 09:58:09 -08:00
Googler 88ef31b429 Update rules_cc to use the correct toolchain type (@bazel_tools//tools/cpp:toolchain_type).
PiperOrigin-RevId: 361158816
Change-Id: Ief011b23ddb9bdf3b49237f90fa631b6f916e8de
2021-03-05 09:10:23 -08:00
Googler 25193de8f5 Tests for unknown commit
Adds test for fix to cc_binary in a previous CL which required a Bazel change.

RELNOTES:none
PiperOrigin-RevId: 361152661
Change-Id: Ic7b9cda6636eff6bc231f00f8cdd542e0c88113c
2021-03-05 08:35:07 -08:00
Copybara-Service a3d7068939 Merge pull request #97 from jlaxson:shared-library-double-inheritance-test
PiperOrigin-RevId: 359022952
Change-Id: Iad8c35e8c9b1a187548cf45b3c2c1f231f275bad
2021-02-23 05:03:02 -08:00
Greg Estren f28c5e2e1b Buildifier feedback 2021-02-11 16:15:29 -05:00
Greg Estren 4e7e7f8cbb Typo fixes 2021-02-11 16:07:27 -05:00
Greg Estren 541927eaa0 Add custom C++ toolchain example.
Inspired by https://github.com/bazelbuild/bazel/issues/12942.
2021-02-11 15:53:44 -05:00
John Laxson 8caeb338c9 Test allowing diamond inheritance of shared lib 2021-02-11 10:33:25 -07:00
Copybara-Service 7bd0e49cfb Merge pull request #85 from benjaminp:modern-linking
PiperOrigin-RevId: 341368143
Change-Id: I9b86beeb90f6df6d3564209f1e97ada4ea7bc319
2020-11-09 02:52:23 -08:00
Googler 991eb349bf Internal change
PiperOrigin-RevId: 340301767
Change-Id: Iccab5010d3fd6e77c08fcdc140cdc1e461185b0d
2020-11-02 13:19:59 -08:00
Googler 699ec52985 Internal change
PiperOrigin-RevId: 339925655
Change-Id: Icde35bf6acb72a382e0253fcf9fb5a10d80a5feb
2020-10-30 13:05:57 -07:00
Googler 16ad606329 Internal change
PiperOrigin-RevId: 339887089
Change-Id: Ic511ced72381f847f5d1b9159f299b6e474a47de
2020-10-30 09:41:38 -07:00
Benjamin Peterson 8994fb0fe1 Adjust c archive example for modern linker input API. 2020-10-26 20:31:47 -05:00
Benjamin Peterson 01cf2299fb Fix //examples/test_cc_shared_library:linking_action_test under --incompatible_linkopts_to_linklibs. 2020-10-22 09:59:37 -05:00
Googler f95239adde Update rules_cc to use the toolchain transition.
This is phase 2 of of the switch to toolchain transitions. See https://github.com/bazelbuild/bazel/issues/11584 for details.

PiperOrigin-RevId: 334808134
Change-Id: Ie198b07359d4fd45368755c4cc223e397f0e8fb0
2020-10-01 07:19:37 -07:00