Commit Graph

576 Commits

Author SHA1 Message Date
Googler 40548a2974 Automatic code cleanup.
PiperOrigin-RevId: 355825197
Change-Id: I8acfc20228816c04fcf48bfcc435cbde2b1fb608
2021-02-05 04:30:09 -08:00
Googler ab2abd3ddc Automatic code cleanup.
PiperOrigin-RevId: 354218909
Change-Id: I223212c3b453e67f0563766e9533fda284aaeef6
2021-01-27 18:31:53 -08:00
Renovate Bot 0d6e7d1ccb
Update bazel_federation commit hash to 8ce885a 2020-12-10 10:06:46 +00:00
Copybara-Service b1c40e1de8 Merge pull request #88 from greenhouse-org:fix-llvm-version
PiperOrigin-RevId: 341810986
Change-Id: Ieb85da0b1c25d095cd48b6cadcf6a5c825d24a48
2020-11-11 05:29:11 -08:00
Copybara-Service 7bcfb53fe8 Merge pull request #89 from keith:ks/update-wrappers
PiperOrigin-RevId: 341770800
Change-Id: I8ea8ef07dc0745342ab93c75aeaf3df69a11a895
2020-11-10 23:24:58 -08: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
Keith Smiley 271d293a8c Update osx_cc_wrappers
These are dup'd from bazel core and are changing in https://github.com/bazelbuild/bazel/pull/12265
2020-11-04 12:35:10 -08:00
Sunjay Bhatia 1a27322a0a Resolve the clang-cl version detection
- bazel presumed a trailing space in `clang-cl -v` output that is
  no longer present in the 11.0.0 release, resulting in an injected newline

Co-authored-by: Sunjay Bhatia <sunjayb@vmware.com>
Co-authored-by: William A Rowe Jr <wrowe@vmware.com>
Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
Signed-off-by: William A Rowe Jr <wrowe@vmware.com>
2020-11-03 16:39:36 -05: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
Googler 8cded3e3c3 Add constants for common groups of action names.
These are used throughout the Crosstool features definitions based on local definitions there.  It seems useful to move these to a common location so they are available for other toolchains (and also so that they get updated if new actions are added to the action-name list).

The versions of these currently used by Crosstool are defined in //third_party/crosstool/v18/llvm_unstable/crosstool_helpers.bzl starting at line 124.
Tested:
  by inspection
PiperOrigin-RevId: 339440647
Change-Id: I3a2b8d37aebd8a0e8450864e079cf5b42d075def
2020-10-28 05:27:07 -07:00
Benjamin Peterson 8994fb0fe1 Adjust c archive example for modern linker input API. 2020-10-26 20:31:47 -05:00
Copybara-Service b2f6e22c34 Merge pull request #84 from benjaminp:fix-for-linkops
PiperOrigin-RevId: 339049823
Change-Id: Ia7550ae25cbe5bac936e86b458f7f322c6f258a0
2020-10-26 09:06:42 -07: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
Copybara-Service f055da4ff0 Merge pull request #82 from keith:ks/update
PiperOrigin-RevId: 335352930
Change-Id: I89c68c510dc6262a06ca76875fd2364abe361c47
2020-10-04 23:01:24 -07:00
Keith Smiley c5a9b6d32f Duplicate libtool_check_unique.cc
This is temporarily required to support old and new versions of bazel
2020-10-03 10:02:04 -07:00
Keith Smiley 5bf327ff82 Sync osx_cc_configure
Fixes https://github.com/bazelbuild/rules_cc/issues/80
2020-10-03 09:59:36 -07: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
Googler 9ec8187d58 Add docstring to providers to make buildifier happy.
RELNOTES: None.
PiperOrigin-RevId: 334807705
Change-Id: If0c97e6a464126367005143313dc4ddc5b47bdea
2020-10-01 07:16:37 -07:00
Copybara-Service 53f28aeac9 Merge pull request #79 from agluszak:system_library
PiperOrigin-RevId: 333279551
Change-Id: I6fdf5aca5881b271d30f5acbad48e0c1ae281237
2020-09-23 06:28:04 -07:00
Andrzej Głuszak 8398f4b2c1 Fixes after code review 2020-09-23 11:11:15 +00:00
Andrzej Głuszak 8346df34b6 Remove line breaks using backslashes 2020-09-22 14:07:45 +00:00
Andrzej Głuszak 299299f82a Move description to doc parameter, add docs for arguments 2020-09-22 13:59:48 +00:00
Copybara-Service bea600c25d Merge pull request #81 from bazelbuild:oquenchil-patch-1
PiperOrigin-RevId: 333058893
Change-Id: I0e390d15cbbb1189834f81bfabf8895b3607100a
2020-09-22 05:35:33 -07:00
oquenchil 34343cfac7
Update CODEOWNERS
Replacing Marcel and Rosica with Charles and Ivo.
2020-09-22 14:26:08 +02:00
Andrzej Głuszak c4886cbf16 Add a module description 2020-09-22 11:48:42 +00:00
Andrzej Głuszak d3808499d2 Fix style 2020-09-22 08:18:25 +00:00
Andrzej Głuszak 6c1dbe079d Implement a repository rule for importing system libraries 2020-09-21 17:47:08 +00:00
Googler 02becfef8b Automatic code cleanup.
PiperOrigin-RevId: 327262788
Change-Id: I13ea852be5ec154593a547e4a4511df5f9c94928
2020-08-18 10:57:24 -07:00
Copybara-Service 1477dbab59 Merge pull request #76 from laurentlb:master
PiperOrigin-RevId: 323574787
Change-Id: I8ede4b3db044e2e0e6e351559783f04487907503
2020-07-28 08:17:49 -07:00
Laurent Le Brun ea0c09ecff Stop depending on rules_pkg through the federation
See discussion on https://github.com/bazelbuild/bazel-federation/issues/117
2020-07-28 14:15:43 +02:00
Copybara-Service 5cbd3dfbd1 Merge pull request #73 from hlopko:skylark_bye_bye
PiperOrigin-RevId: 314484747
Change-Id: Ic88f26a254371a4204844e279a4a189f9775b2d0
2020-06-03 00:53:38 -07:00
Marcel Hlopko d6cfe773b8 Rename skylark->starlark 2020-06-03 09:13:26 +02:00
Googler 818289e561 Add flags to cc_shared_library for easier debugging
--//examples:incompatible_link_once=False[default = False]
When True, it will be an error to link the same library more than once
unless it has the tag LINKABLE_MORE_THAN_ONCE

--//examples:experimental_debug=True[default = False]
When True, it will generate files listing the exports of each cc_shared_library
and which libraries are linked to it statically.

RELNOTES:none
PiperOrigin-RevId: 311323625
Change-Id: I340cc71965650f7c9dd7ef7fb9656da362021527
2020-05-13 07:24:06 -07:00
Googler 8c31dd406c Change cc_shared_library exports logic.
Changes in this CL:
1. 'exports' attribute renamed to roots
2. Removed restrictions for exporting a rule in a different repository
3. Kept restrictions for rules in the same repository but not in the same
package or subpackages
4. To get around restrictions, instead of the exported_by tag, one can use the
cc_shared_library_permissions rule
5. Added exports_filter that will match libraries in the transitive closure of
a root. Anything matched by the exports_filter will also be exported.
Restrictions as in 4. still apply.

RELNOTES:none
PiperOrigin-RevId: 310547916
Change-Id: I32d8e0d4dd4bcc9c9e92f4ff3c5b2a01564c31b2
2020-05-08 06:35:54 -07:00
Yannic Bonenberger dbe8807224 Add optional tool_path_origin to Tools in C++ crosstool
This change adds an optional field to the C++ crosstool proto that
allows configuring the origin tool_path is relative to.

For now, the origin can be one of the following:
  - CROSSTOOL_PACKAGE: If tool_path is a relative path, it's assumed to
    be relative to the package of the crosstool top.
  - FILESYSTEM_ROOT: tool_path is an absolute path. This is checked by
    Bazel.
  - WORKSPACE_ROOT: tool_path must be a relative path and is assumed to
    be relative to the exec-root of the workspace (similar to other
    executables).

Updates bazelbuild/bazel#8438

Closes #10967.

PiperOrigin-RevId: 310142352
Change-Id: If6316ffa5d7d2713b197840b4aafb2f0cdbb0b96
2020-05-06 06:52:27 -07:00
Copybara-Service 9ddf8aac74 Merge pull request #70 from hlopko:disable-unnamed-macro
PiperOrigin-RevId: 309715272
Change-Id: I3623a890776af2ff2e344e755b673fb9a58d3fc8
2020-05-04 04:03:00 -07:00
Marcel Hlopko 0e4443f2ca Instead disable the buildifier warning 2020-05-04 11:59:13 +02:00
Marcel Hlopko 65436199d8 Duh 2020-05-04 11:59:13 +02:00
Marcel Hlopko e8781b53aa Fix repositories.bzl 2020-05-04 11:59:10 +02:00
Marcel Hlopko b70b375b6d Add `name` parameter to `cc_configure`
To satisfy the buildifier and make the build green again.
2020-05-04 11:58:50 +02:00
Marcel Hlopko ed50da4736 Disable unnamed-macro check for cc_configure 2020-05-04 11:58:50 +02:00
Googler 4c3e410486 C++: Fix path checking cc_shared_library
We were returning false when checking whether //foo:bar is under
//:__subpackages__

RELNOTES:none
PiperOrigin-RevId: 307808962
Change-Id: I080e4c239b75c188dae8af89f4b38aa935d92b0d
2020-04-22 07:05:49 -07:00
Googler a74452e910 C++: Optimize cc_shared_library
1. Don't pop from the front of the list being iterated on
2. Don't visit the same node_label more than once

RELNOTES:none
PiperOrigin-RevId: 307610981
Change-Id: I9b35a27a1bdabafbe290d1ff23eeb4659b07d554
2020-04-21 08:38:17 -07:00
Copybara-Service 77099ee80d Merge pull request #69 from Yexo:master
PiperOrigin-RevId: 307024012
Change-Id: I40dd8d6310437099dd90fb7beec854696c67a561
2020-04-17 05:03:37 -07:00
Googler 67086db2c4 Remove obsolete alias to //external:cc_toolchain.
RELNOTES: None.
PiperOrigin-RevId: 306383589
Change-Id: Id1c4cebefb444d7bd76624ef05a623eafd75808d
2020-04-13 23:44:09 -07:00
Googler 7c3170fe93 Automatic code cleanup.
PiperOrigin-RevId: 305641156
Change-Id: I4f0b09f27d06c00ab23e6c7f19b187c09c8937f7
2020-04-09 01:35:48 -07:00
Thijs Marinussen d97ac303e5 Stop using the deprecated items parameter. See https://github.com/bazelbuild/bazel/issues/9017 for details 2020-03-30 15:16:33 +02:00
Googler 34ca16f4aa Partially fix MacOS llvm coverage collection
This allows setting GCOV on the command line to overwrite the default setting, which points to /usr/bin/gcov. In order to use this, you also need to disable the gcov coverage feature and enable the llvm coverage feature instead. The full command-line looks like this:

GCOV=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/llvm-profdata bazel coverage --features=llvm_coverage_map_format --features=-gcc_coverage_map_format //cpp:test

Progress on #10457.

Original change by ulfjack
RELNOTES: None.
PiperOrigin-RevId: 300583709
Change-Id: Ibeda8469db6750fc9fc3bba60e19118a2e482ed8
2020-03-12 11:08:12 -07:00