aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/build_defs
Commit message (Collapse)AuthorAge
...
* Automated g4 rollback of commit df3d09baf2adc2b84825a6e706f9f0c041e72425.Gravatar Googler2017-05-03
| | | | | | | | | | | | *** Reason for rollback *** Rolling back the switch to rules_docker due to substantial performance regression in certain actions. *** Original change description *** Emit warnings when the bundled docker_build and docker_bundle rules are used. PiperOrigin-RevId: 154869510
* Emit warnings when the bundled docker_build and docker_bundle rules are used.Gravatar Googler2017-05-03
| | | | PiperOrigin-RevId: 154835221
* Make tools/build_defs/hash/sha256.py py3 compatibleGravatar David Flemström2017-05-02
| | | | | | Closes #2866. PiperOrigin-RevId: 154817470
* Make tools/build_defs/pkg/archive.py py3 compatibleGravatar David Flemström2017-05-02
| | | | | | | | | | | | | | | Without this change, any build using python3 and involving this tool fails with: Traceback (most recent call last): File ".../bazel-out/host/bin/external/bazel_tools/tools/build_defs/pkg/build_tar.runfiles/__main__/../bazel_tools/tools/build_defs/pkg/build_tar.py", line 22, in <module> from tools.build_defs.pkg import archive File ".../bazel-out/host/bin/external/bazel_tools/tools/build_defs/pkg/build_tar.runfiles/bazel_tools/tools/build_defs/pkg/archive.py", line 17, in <module> from StringIO import StringIO ModuleNotFoundError: No module named 'StringIO' Closes #2865. PiperOrigin-RevId: 154808860
* Adjust the visibility of this rule, which is needed for the migration of ↵Gravatar Googler2017-04-28
| | | | | | docker_build to rules_docker. PiperOrigin-RevId: 154431359
* Add possibility to set ownership of files on pkg_tarGravatar Damien Martin-Guillerez2017-04-24
| | | | | Change-Id: Ic8c57c0ce78b5875135d5d1f19629ee40fd8f5f2 PiperOrigin-RevId: 153718869
* Support top level package for docker image.Gravatar Linuxer Wang2017-04-24
| | | | | | | | Fixes #616. Closes #2807. PiperOrigin-RevId: 153714590
* Remove tools/build_defs/apple/apple.bzl.Gravatar thomasvl2017-04-20
| | | | PiperOrigin-RevId: 153589856
* Move the sha256 tool into its own directory, as it isn't specific to ↵Gravatar Googler2017-04-19
| | | | | | docker_build. PiperOrigin-RevId: 153508081
* Copy swift.bzl into bazel_rules/rules_apple.Gravatar allevato2017-04-11
| | | | PiperOrigin-RevId: 152729637
* Use sha256 prefix when tagging docker images with full IDsGravatar Jason Young2017-04-11
| | | | | | | | | | | | | | | | | | | | Newer versions of docker require 'sha256' prefix with full IDs (see https://github.com/docker/docker/issues/20972#issuecomment-193381422). Without the prefix users get the following error with newer versions of docke, e.g. 17.04.0-ce-rc1: $ docker tag 7cd4bfeb6766d1c5e5d729b7444cba3d9f97dfddfbeab90ed2e3f7147804ee8f \ docker.io/<user>/<image>:<tag> Error parsing reference: "7cd4bfeb6766d1c5e5d729b7444cba3d9f97dfddfbeab90ed2e3f7147804ee8f" is not a valid repository/tag: invalid repository name (7cd4bfeb6766d1c5e5d729b7444cba3d9f97dfddfbeab90ed2e3f7147804ee8f), cannot specify 64-byte hexadecimal strings --- I'm not sure if this is the proper solution, but it seems to fix the problem with docker version `17.04.0-ce-rc1` as well as older docker version (e.g. `1.12.0`). Alternative solutions welcome. Closes #2755. PiperOrigin-RevId: 152685896
* Description redacted.Gravatar Googler2017-03-27
| | | | | | -- PiperOrigin-RevId: 151263526 MOS_MIGRATED_REVID=151263526
* Disable sandboxing for some bundling actions.Gravatar Googler2017-03-27
| | | | | | -- PiperOrigin-RevId: 151193034 MOS_MIGRATED_REVID=151193034
* Add "resources", "structured_resources" attrs to swift_library.Gravatar Googler2017-03-27
| | | | | | -- PiperOrigin-RevId: 151183770 MOS_MIGRATED_REVID=151183770
* Add a test that a v2.2 format tarball used as a base image contains the ↵Gravatar Googler2017-03-20
| | | | | | | | appropriate ancestry. -- PiperOrigin-RevId: 150530623 MOS_MIGRATED_REVID=150530623
* Reword a commentGravatar Googler2017-03-20
| | | | | | -- PiperOrigin-RevId: 150435164 MOS_MIGRATED_REVID=150435164
* Break apart the monolithic docker.bzl into smaller pieces that logically ↵Gravatar Googler2017-03-16
| | | | | | | | group functions, constants and rules. -- PiperOrigin-RevId: 150326696 MOS_MIGRATED_REVID=150326696
* Rollback of commit 4af8f5bff567e7cad179fb803070764791353f8a.Gravatar Googler2017-03-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Fixing the test, which relied on a magic hidden feature I removed. *** Original change description *** Automated [] rollback of commit 5621a2c73337d82fe328069dbb0621e46e9e1c25. *** Reason for rollback *** This change broke bazel-docker-tests: http://ci.bazel.io/job/bazel-docker-tests/BAZEL_VERSION=HEAD,PLATFORM_NAME=docker/457/console *** Original change description *** This change adds support for a docker_bundle rule, refactoring a number of interfaces to support shared use with docker_build. This also fixes "docker load -i <bazel output>", which was broken on newer clients due to a lack of tag data in manifest.json... *** -- PiperOrigin-RevId: 149110613 MOS_MIGRATED_REVID=149110613
* Rollback of commit 5621a2c73337d82fe328069dbb0621e46e9e1c25.Gravatar Yue Gan2017-03-01
| | | | | | | | | | | | | | | | | *** Reason for rollback *** This change broke bazel-docker-tests: http://ci.bazel.io/job/bazel-docker-tests/BAZEL_VERSION=HEAD,PLATFORM_NAME=docker/457/console *** Original change description *** This change adds support for a docker_bundle rule, refactoring a number of interfaces to support shared use with docker_build. This also fixes "docker load -i <bazel output>", which was broken on newer clients due to a lack of tag data in manifest.json's RepoTags. -- PiperOrigin-RevId: 148890386 MOS_MIGRATED_REVID=148890386
* This change adds support for a docker_bundle rule, refactoring a number of ↵Gravatar Googler2017-02-28
| | | | | | | | | | interfaces to support shared use with docker_build. This also fixes "docker load -i <bazel output>", which was broken on newer clients due to a lack of tag data in manifest.json's RepoTags. -- PiperOrigin-RevId: 148767383 MOS_MIGRATED_REVID=148767383
* Make bazel_bootstrap_distfile_test work on WindowsGravatar Yun Peng2017-02-23
| | | | | | | | -- Change-Id: Ia6c94304fded25de48eda2060c5ec11368ff172c Reviewed-on: https://cr.bazel.build/8991 PiperOrigin-RevId: 148286095 MOS_MIGRATED_REVID=148286095
* Fixes directory path computation in docker_build Gravatar Vlad Losev2017-02-16
| | | | | | | | | | | | | This fixes #1178. When a docker_build rule has a `files` input that is at the root of the repository, it contains no / characters, and the current version of `_short_path_dirname` returns the last character of the name instead of an empty string. Closes #2529. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/2529 PiperOrigin-RevId: 147714720 MOS_MIGRATED_REVID=147714720
* Adds -disable-autolink-framework to static libraries so that they are not ↵Gravatar Sergio Campama2017-02-07
| | | | | | | | added by default as -framework arguments when linking. This enables test bundles on not having to relink static frameworks that were also linked in to the test host app. -- PiperOrigin-RevId: 146713403 MOS_MIGRATED_REVID=146713403
* Add pkg_rpm build rule to help generating RPM packages. Gravatar John Cater2017-02-06
| | | | | | | | | | RELNOTES: Adds pkg_rpm rule for generating RPM packages. -- Change-Id: I2e83161e29218700bbe7e62186b0b1667e555a7c Reviewed-on: https://cr.bazel.build/8590 PiperOrigin-RevId: 146477490 MOS_MIGRATED_REVID=146477490
* Fix skylark syntax error in Bazel git_repositories.bzl.Gravatar Adam Michael2017-02-02
| | | | | | | | Identified in https://github.com/bazelbuild/bazel/issues/1408. -- PiperOrigin-RevId: 146308540 MOS_MIGRATED_REVID=146308540
* maven_rules.bzl: Fix maven coordinates order mismatch Gravatar David Ostrovsky2017-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Classifier should be provided in the form: "groupId:artifactId:version[:packaging][:classifier]" because that's what maven-dependency-plugin expects and not in the form: "groupId:artifactId[:packaging][:classifier]:version" as documented here: [1]. Also it was missed to reflect the classifier in the output artifact name. TEST PLAN: WORKSPACE: load("//tools:maven_rules.bzl", "maven_jar", "maven_dependency_plugin") maven_dependency_plugin() maven_jar( name = "jetty_server_sources", artifact = "org.eclipse.jetty:jetty-server:9.3.11.v20160721:jar:sources", sha1 = "b23cac190808baed928260b2c9beca3b1ed232b4", ) BUILD: java_library( name = "jetty-server-sources", exports = ["@jetty_server_sources//jar"], ) $ bazel build :jetty-server-sources [...] Target //:jetty-server-sources up-to-date: bazel-bin/libjetty-server-sources.jar [1] https://maven.apache.org/pom.html#Maven_Coordinates Fixes #2049. -- Change-Id: I3297fb3676324cc6b4bb6ff6b2b6e18ce33f633c Reviewed-on: https://cr.bazel.build/7213 PiperOrigin-RevId: 144972944 MOS_MIGRATED_REVID=144972944
* Fix-up release-related TODOs.Gravatar Dmitry Shevchenko2017-01-19
| | | | | | -- PiperOrigin-RevId: 144965639 MOS_MIGRATED_REVID=144965639
* Add --swiftcopt support to swift_libraryGravatar Dmitry Shevchenko2017-01-12
| | | | | | -- PiperOrigin-RevId: 144231300 MOS_MIGRATED_REVID=144231300
* Remove method presence check after a bazel releaseGravatar Dmitry Shevchenko2017-01-10
| | | | | | -- PiperOrigin-RevId: 143966520 MOS_MIGRATED_REVID=143966520
* Remove conditionals in skylark apple rules for presence of ↵Gravatar Chris Parsons2017-01-06
| | | | | | | | objc.dynamic_framework_dir -- PiperOrigin-RevId: 143700968 MOS_MIGRATED_REVID=143700968
* Force debug info output into Swift modulesGravatar Dmitry Shevchenko2017-01-05
| | | | | | | | * This makes sure that all swiftmodule artifacts contain debug information needed for LLDB to recreate the module at runtime. -- PiperOrigin-RevId: 143685225 MOS_MIGRATED_REVID=143685225
* Rollback of commit b7c00d8762d74fb54d0a6b0eb355abc6dc7a97c3.Gravatar Damien Martin-Guillerez2016-12-22
| | | | | | | | | | | | | | *** Reason for rollback *** Does not build: http://ci.bazel.io/job/Bazel/1129/ *** Original change description *** Export dot-format graphs as-is and download dot as an external repo -- PiperOrigin-RevId: 142748151 MOS_MIGRATED_REVID=142748151
* Export dot-format graphs as-is and download dot as an external repoGravatar Kristina Chodorow2016-12-22
| | | | | | -- PiperOrigin-RevId: 142692462 MOS_MIGRATED_REVID=142692462
* Global cleanup change.Gravatar Kristina Chodorow2016-12-21
| | | | | | -- PiperOrigin-RevId: 142596233 MOS_MIGRATED_REVID=142596233
* Enable threaded Whole Module OptimizationGravatar Dmitry Shevchenko2016-12-21
| | | | | | | | * This seems to fix an issue with dsymutil and lldb not getting correct debug maps out of binaries built with WMO enabled. -- PiperOrigin-RevId: 142578572 MOS_MIGRATED_REVID=142578572
* Rollback of commit b9f914fa56a00530d38b597dc853aad50d1decfb.Gravatar Kristina Chodorow2016-12-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks CI "Parameter 'url' has no default value", see http://ci.bazel.io/view/Bazel%20bootstrap%20and%20maintenance/job/Bazel/JAVA_VERSION=1.7,PLATFORM_NAME=linux-x86_64/1104/console. *** Original change description *** Make Bazel build dot This change has several parts, it: * Adds a "make" repository rule, which runs ./configure && make on a repository. * Modifies the tar.gz decompressor to restore timestamps. This was an issue with dot, as make examines the timestamp to determine if files need to be rebuilt. Because Bazel was not preserving the archive's timestamp, it was rebuilding things that it did not need to (and, I think, exposed some bugs in dot's Makefile). * Actually add dot as an externa... *** -- PiperOrigin-RevId: 142469299 MOS_MIGRATED_REVID=142469299
* Make Bazel build dotGravatar Kristina Chodorow2016-12-19
| | | | | | | | | | | | | | | | | | | | | | This change has several parts, it: * Adds a "make" repository rule, which runs ./configure && make on a repository. * Modifies the tar.gz decompressor to restore timestamps. This was an issue with dot, as make examines the timestamp to determine if files need to be rebuilt. Because Bazel was not preserving the archive's timestamp, it was rebuilding things that it did not need to (and, I think, exposed some bugs in dot's Makefile). * Actually add dot as an external repository. I made the dot-graph target manual, so it won't be downloaded/built by the default //... target. * Remove dot scrubbing from the Bazel export process. * Added some names to download_and_extract params, because it's really annoying to only be able to reference them positionally. -- PiperOrigin-RevId: 142452055 MOS_MIGRATED_REVID=142452055
* Expose apple_generate_dsym value to Skylark and use in swift_libraryGravatar Dmitry Shevchenko2016-12-16
| | | | | | -- PiperOrigin-RevId: 142194378 MOS_MIGRATED_REVID=142194378
* Add an option to enable Whole Module OptimizationGravatar Dmitry Shevchenko2016-12-15
| | | | | | | | This is not production ready, but allows us to collect user feedback on this option. -- PiperOrigin-RevId: 142166665 MOS_MIGRATED_REVID=142166665
* Extract swiftc input calculation from swift_libraryGravatar Googler2016-12-14
| | | | | | -- PiperOrigin-RevId: 142046117 MOS_MIGRATED_REVID=142046117
* Extract swiftc argument generation from swift_library implementationGravatar Googler2016-12-13
| | | | | | | | | | | Make it possible to use compiler args that swift_library creates in other rules that do not depend on it. Also rename _module_name to swift_module_name and make it public because proper usage of swiftc_args requires a module name to be passed in. -- PiperOrigin-RevId: 141926959 MOS_MIGRATED_REVID=141926959
* Switch to using multi-level repository names by default.Gravatar Googler2016-12-13
| | | | | | | | | | | | When these rules were originally written, I'd wanted the repository names embeded in the tarball to have a similar shape to Blaze's output trees, but unfortunately multi-level names were not yet supported. Support for multiple levels was introduced as part of the v2 registry specification, which is now all DockerHub supports, and the vast majority of clients in circulation support multi-level names. This change implements my original intention, which is to name the resulting image: bazel/{target}. To get the legacy naming system use the attribute: embed_flat_names=True. RELNOTES[INC]: docker_build: change the repository names embedded by docker_build. You can revert to the old behavior by setting legacy_repository_naming=True. -- PiperOrigin-RevId: 141886976 MOS_MIGRATED_REVID=141886976
* Break out xcrun env from xcrun_actionGravatar Dmitry Shevchenko2016-12-12
| | | | | | -- PiperOrigin-RevId: 141784902 MOS_MIGRATED_REVID=141784902
* Rollforward of "Split ObjcProvider.framework_dir into static and dynamic ↵Gravatar Chris Parsons2016-12-06
| | | | | | | | | | framework directories." This is a rollforward of the first attempt, which broke swift rules. -- PiperOrigin-RevId: 141210876 MOS_MIGRATED_REVID=141210876
* Make the settings attribute of Skylark maven_jar and maven_aar a label.Gravatar Adam Michael2016-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/2117. The settings attribute allows you to optional specify a custom Maven settings.xml file as a label. Previously, this attribute was an absolute path. As an absolute path it cannot really be used to specify a file in the workspace because each developer may install the workspace in a different location. And if the settings.xml cannot be included in the workspace, the developers may as well use one of Maven's default locations for settings.xml. Now the attribute is a label. An example use case is: $ cat WORKSPACE load("@bazel_tools//tools/build_defs/repo:maven_rules.bzl") maven_jar( name = "guava", artifact = "com.google.guava:guava:19.0", settings = "//:my_custom_settings.xml", ) $ cat BUILD java_library( srcs = glob(["**/*.java"]), deps = ["@guava//jar"], ) $ cat my_custom_settings.xml <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd"> <mirrors> <mirror> <id>planetmirror.com</id> <name>PlanetMirror Australia</name> <url>http://downloads.planetmirror.com/pub/maven2</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors> </settings> Note that `settings = "my_custom_settings.xml"` will not work as the workspace rule will not know to look in the main workspace. RELNOTES[INC]: Skylark maven_jar and maven_aar settings attribute is now a label so it can be checked into your workspace. -- PiperOrigin-RevId: 140861633 MOS_MIGRATED_REVID=140861633
* Enable fallback URLs in Skylark http rules.Gravatar David Chen2016-12-01
| | | | | | | RELNOTES: Enable fallback URLs in Skylark http rules. -- MOS_MIGRATED_REVID=140630438
* Skylark implementations of http_archive, new_http_archive, and http_file rules.Gravatar David Chen2016-11-21
| | | | | | | RELNOTES: Skylark implementations of http_archive, new_http_archive, and http_file. -- MOS_MIGRATED_REVID=139633771
* Mark pkg_tar dependencies as Python 3 compatibleGravatar Damien Martin-Guillerez2016-11-18
| | | | | | | This should allow to use pkg_tar from project that use python 3 (e.g. TensorFlow). -- MOS_MIGRATED_REVID=139561406
* Creates maven_aar rule to generate aar_import for AARs from Maven.Gravatar Adam Michael2016-11-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://github.com/bazelbuild/bazel/issues/561. To use this rule, you will need to include the following line in your WORKSPACE file: load("@bazel_tools//tools/build_defs/repo:maven_rules.bzl", "maven_aar") After that, you can use the maven_aar repository rule in your WORKSPACE file as such: maven_aar( name = "facebook_android_sdk", artifact = "com.facebook.android:facebook-android-sdk:3.19.0", ) Then in your BUILD files, your android_library and android_binary targets can depend on the AAR with the following syntax: android_binary( name = "my_app", ... deps = [ "@facebook_android_sdk//aar", ... ], ) The resources, classes and native libs from the AAR will be provided. Note however that some features of AAR files are not yet supported, including assets, Proguard maps and lint jars. -- MOS_MIGRATED_REVID=138575421
* Allow swiftc to correctly recognize main.swift as script target.Gravatar Dmitry Shevchenko2016-11-07
| | | | | | | * This change removes forced -parse-as-library mode in favor of the driver figuring out how to parse each source. This means that main.swift will be parsed as a script and can contain top-level expressions. -- MOS_MIGRATED_REVID=138285669