aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
Commit message (Collapse)AuthorAge
* Fix CROSSTOOL.tpl to correctly target watchos_i386.Gravatar kaipi2018-02-13
| | | | PiperOrigin-RevId: 185556666
* new_git_repository: support date-based shallow clonesGravatar Klaus Aehlig2018-02-13
| | | | | | | | | | | | | | Add an optional 'shallow_since' parameter to new_git_repository to allow more shallow clones. As opposed to a fixed depths, specifying a date does not get outdated if the branch progresses further. Also, use fully shallow clones if no commit is specified. A (floating) branch or tag can always be cloned in a truly shallow fashion. Improves on #4359. Change-Id: I8459c8f55042c98da2e43f57b7960a291004d26b PiperOrigin-RevId: 185504534
* Automated rollback of commit 28bd997c1c8793973f63dcae4c22bbae49e7d8b7.Gravatar Googler2018-02-12
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** https://github.com/bazelbuild/bazel/issues/4625 What I thought was a short fix is turning into a long hunt, so I better roll this back to get the build green again. I'm not yet 100% certain what the interactions are, but there's a chance that it's back to the drawing board. *** Original change description *** Fixing test-setup.sh occasionally missing stdout/stderr, on systems where "tail --pid" is supported. The solutions aren't mine, the new test was taken from Ola's unknown commit and the way to avoid race condition courtesy of sethkoehler@ Mitigates #4608 for compatible Linux systems. TESTED=manual scripts and new test case. RELNOTES: None PiperOrigin-RevId: 185482604
* Fix parameter names in docsGravatar Googler2018-02-12
| | | | | RELNOTES: None PiperOrigin-RevId: 185436886
* git_repository: add missing args to doc stringGravatar Klaus Aehlig2018-02-12
| | | | | Change-Id: Id898aafaf1a5dec16e5639f50981c1051caa70eb PiperOrigin-RevId: 185390071
* Fixing test-setup.sh occasionally missing stdout/stderr, on systems where ↵Gravatar Googler2018-02-12
| | | | | | | | | | | | "tail --pid" is supported. The solutions aren't mine, the new test was taken from Ola's unknown commit and the way to avoid race condition courtesy of sethkoehler@ Mitigates #4608 for compatible Linux systems. TESTED=manual scripts and new test case. RELNOTES: None PiperOrigin-RevId: 185374273
* C++: Allows adding linkopts through file.Gravatar plf2018-02-12
| | | | | | | The file can be generated during execution by a different rule. RELNOTES:none PiperOrigin-RevId: 185361140
* Remove hard-wired basenames for the test setup and the coverage collection ↵Gravatar lberki2018-02-09
| | | | | | | | | script. Accomplished by creating an explicit attribute for both of them on test actions. RELNOTES: None. PiperOrigin-RevId: 185132460
* Introduce -c source_file -o output_file build variablesGravatar hlopko2018-02-08
| | | | | | | | | | | | | | Prior to this cl CompileCommandLine would (almost) unconditionally emit -c and -o flags. This cl removes this logic and relies on crosstool to emit these flags. This is another small step towards platform independent C++ rules. Memory use is not affected, since the build variables used by this cl are already exposed, this cl just forces crosstools to use it. Encore of https://github.com/bazelbuild/bazel/commit/f26e8694ae78599b3e2004e3360eaf3443fa53a6. RELNOTES: None. PiperOrigin-RevId: 184981106
* Hooks to support core library desugaring in Android buildsGravatar kmb2018-02-07
| | | | | | RELNOTES: None. PiperOrigin-RevId: 184909685
* Converts wrapped_clang from a bash script to a C++ source file which is ↵Gravatar kaipi2018-02-06
| | | | | | | | | | | | compiled as part of bazel's repository bootstrap. This should make crosstool's clang invocations faster. An added benefit of this is that wrapped_clang.cc supports the "DSYM_HINT" flags specified through the CROSSTOOL, so with this change, apple_binary gets support for the --apple_generate_dsym flag. The dSYM generation issue has been flagged multiple times: https://github.com/bazelbuild/bazel/issues/4312 https://github.com/bazelbuild/bazel/issues/3940 https://github.com/bazelbuild/bazel/issues/3372 RELNOTES: apple_binary can now generate dSYM outputs with the --apple_generate_dsym=true flag. PiperOrigin-RevId: 184688215
* Support legacy multidex.Gravatar ajmichael2018-02-05
| | | | | | | Fix the create_main_dex_list stub script to find the dx jar binary correctly. RELNOTES: None PiperOrigin-RevId: 184532530
* sha256 python tool: stream instead of reading whole file beforehandGravatar Hadrien Chauvin2018-02-05
| | | | | | | | This is a rather small change to a Python tool used to produce a SHA256 hash. Currently, the whole file is loaded in memory before computing the hash, which causes problem when large files are processed. For instance, github.com/bazelbuild/rules_docker uses it to compute the hash of Docker images, which can be multiple GB in size. This PR avoids the tool to cause issues in a limited-memory environment. Closes #4243. PiperOrigin-RevId: 184518900
* python,runfiles: runfiles library in @bazel_toolsGravatar Laszlo Csomor2018-02-05
| | | | | | | | | | | | | Also update the Python stub script template to set $RUNFILES_MANIFEST_FILE or $RUNFILES_DIR so the runfiles library only needs to look for those. See https://github.com/bazelbuild/bazel/issues/4460 RELNOTES[NEW]: python,runfiles: You can now depend on `@bazel_tools//tools/runfiles:py-runfiles` to get a platform-independent runfiles library for Python. See DocString of https://github.com/bazelbuild/bazel/blob/master/src/tools/runfiles/runfiles.py for usage information. Change-Id: I4f68a11cb59f2782e5203e39fe60cc66b46023a2 PiperOrigin-RevId: 184515490
* http_archive: allow top-level BUILD files to be overriddenGravatar Klaus Aehlig2018-02-01
| | | | | | | | | ..by the `build_file` parameter, even if the external repository contains a top-level BUILD file. While there, also add a test verifying that this is also possible via the `build_file_content`. Change-Id: I1b875c147cfcd6f1c70b8efeb10c2b406eeacf6a PiperOrigin-RevId: 184134041
* http_archive: remove outdated commentGravatar Klaus Aehlig2018-02-01
| | | | | | | | http_archive from @bazel_tools does know how to bring its own BUILD file by now. Change-Id: I9bbda6635f4459b77600e9ee6db3284f826d7931 PiperOrigin-RevId: 184129975
* Change git clone to pull all history, so all needed commits can be accessed.Gravatar John Cater2018-01-30
| | | | | | | Fixes #4537. Change-Id: I28afcbc89e230e319788c2426e57d43c1ad5dfee PiperOrigin-RevId: 183827742
* windows,test: add logging to bootstrap testGravatar Laszlo Csomor2018-01-29
| | | | | | | | | | | | | | | Add logging to bazel_bootstrap_distfile_test in case it is running on Windows. The logging will help collect basic performance stats. Also remove the %N placeholder from `date` format string in the log messages, because macOS doesn't support it. See https://github.com/bazelbuild/bazel/issues/4503 Change-Id: Idf00bf1512d02a793b27e1cc761fbcd630e79618 PiperOrigin-RevId: 183642578
* Make pkg defs Python 2/3 compatibleGravatar treuherz2018-01-26
| | | | | | | | | | | Use BytesIO instead of StringIO, change strings to bytes throughout the archiving code. Needed to import from Six in a couple of places. As discussed in #1580 Closes #3850. PiperOrigin-RevId: 183429066
* Create @bazel_tools//tools/android:android_jar.Gravatar ajmichael2018-01-26
| | | | | RELNOTES: Replace //tools/defaults:android_jar with @bazel_tools//tools/android:android_jar. //tools/defaults:android_jar will be removed in a future release. PiperOrigin-RevId: 183404151
* Stop setting annotations_jar in Bazel android_sdk.Gravatar ajmichael2018-01-26
| | | | | | | It is optional as of https://github.com/bazelbuild/bazel/commit/1a6ca6f47aef36d56b5cb2f9da114af75dde583d. RELNOTES: None PiperOrigin-RevId: 183391869
* Stop bundling proguard.jar from android sdk into our integration tests.Gravatar ajmichael2018-01-25
| | | | | | | We don't use it. RELNOTES: None PiperOrigin-RevId: 183275864
* http_archive: work around #2700Gravatar Klaus Aehlig2018-01-25
| | | | | | | | | | Move the print statement about the used BUILD file earlier in the _http_archive_impl function, so that the BUILD file is accessed before we call out to the network for the first time. In this way, we avoid fetching the same file twice in a single build. Change-Id: I2b9be4e6a00da2de0cde56896d84c0ba9721456d PiperOrigin-RevId: 183251555
* Update make_rpm.py to check whether rpmbuild is present and report an error ↵Gravatar John Cater2018-01-24
| | | | | | | | | if not. Fixes #4065. Change-Id: I17a5d2ee4befc5e467b0a195311566db246eb167 PiperOrigin-RevId: 183087906
* Suppress an unchecked warningGravatar cushon2018-01-24
| | | | | | Fixes #4513 PiperOrigin-RevId: 183060664
* Pass the correct path of aapt_binary and merge its data runfiles into ↵Gravatar jingwen2018-01-23
| | | | | | | | android_instrumentation_test's runfiles. GITHUB: #903 RELNOTES: None. PiperOrigin-RevId: 182940009
* Add JavaRuntimeToolchainInfo class to wrap JavaRuntimeInfo for toolchains ↵Gravatar John Cater2018-01-23
| | | | | | | access. Change-Id: I6041c51823fa52d6ae55dfe06afd1754ce05ab98 PiperOrigin-RevId: 182904580
* http_archive: allow using the shipped BUILD fileGravatar Klaus Aehlig2018-01-23
| | | | | | | | | | Bazel may also depend on external repositories that already contain build files. When using http_archive from @bazel_tools also support that use case, by supporting simply omitting `build_file` and `build_file_contents`. Change-Id: I40a9b85ae0aba850c73104d2e2fe7f7ee814e093 PiperOrigin-RevId: 182893460
* Automated rollback of commit 2aeaeba66857c561dd6d63c79a213f1cabc3650d.Gravatar dslomov2018-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks C++ on gcc 4.8.4 (specifically, TensorFlow: https://github.com/bazelbuild/bazel/issues/4474) Fixes #4474 *** Original change description *** When linking mostly-static Linux binaries, link libstdc++.a explicitly. This allows libstdc++ to be statically linked, which is normally only possible when invoking GCC as `g++` with the `-static-libstdc++` flag. Fixes https://github.com/bazelbuild/bazel/issues/2840 See https://github.com/envoyproxy/envoy/issues/415 for additional background and context. cc @htuch (for Envoy) and @calpeyser @hlopko (who I talked to earlier about this)... *** RELNOTES: None. PiperOrigin-RevId: 182519445
* aar_resources_extractor ignore empty res/ and assets/ dirs.Gravatar ajmichael2018-01-18
| | | | | RELNOTES: None PiperOrigin-RevId: 182416060
* Point android_instrumentation_test's test runner to the vendoredGravatar jingwen2018-01-17
| | | | | | | | deploy jar at @android_test_support//:instrumentation_test_runner alias to @android_test_support//opensource:entry_point_deploy.jar GITHUB: #903 RELNOTES: None. PiperOrigin-RevId: 182310718
* Add assets support to aar_import.Gravatar ajmichael2018-01-16
| | | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/4439. Empty assets are handled by writing out an empty file named "assets/empty_asset_generated_by_bazel~", which will silently be ignored by AAPT. RELNOTES: aar_import now supports assets. PiperOrigin-RevId: 182110400
* HOME missing from the action env (despite mentioned in the docs)Gravatar Gursewak2018-01-16
| | | | | | | | Issue #4401 Closes #4437. PiperOrigin-RevId: 182067976
* http_archive: support programmatic patchingGravatar Klaus Aehlig2018-01-16
| | | | | | | | | | | Support applying a sequence of commands to an http_archive, after the patch files are applied. In this way, tasks like shebang-fixes can easily be added. Fixes #3395. Change-Id: Ifdad584a852efd425c436d57ef71a0d681488629 PiperOrigin-RevId: 182037265
* java,runfiles: runfiles library in @bazel_toolsGravatar Laszlo Csomor2018-01-16
| | | | | | | | | | | | | | Also make most targets in `//src/tools/runfiles` private. The user should depend on `@bazel_tools//tools/runfiles:$LANG-runfiles` instead. See https://github.com/bazelbuild/bazel/issues/4460 RELNOTES[NEW]: java,runfiles: You can now depend on `@bazel_tools//tools/runfiles:java-runfiles` to get a platform-independent runfiles library for Java. See JavaDoc of https://github.com/bazelbuild/bazel/blob/master/src/tools/runfiles/java/com/google/devtools/build/runfiles/Runfiles.java for usage information. Change-Id: Iba9113453222ae74ce42a324272711f613104891 PiperOrigin-RevId: 182022851
* Support patches in http_archiveGravatar Klaus Aehlig2018-01-15
| | | | | | | | | | | Support applying a sequence of patches for external repositories imported via http_archive. (Note that we only support the version from @bazel_tools, not the deprecated native rules.) Works towards #3395. Change-Id: I96c746acc04790b051eb686856c04a3ff3c90059 PiperOrigin-RevId: 181975322
* Use BAZEL_SH if available instead of hard-coding bash in git.bzlGravatar Dmitry Lomov2018-01-15
| | | | | | | Fixes #3699. Change-Id: I44028476be96037334a1ae48de450d625925676f PiperOrigin-RevId: 181962926
* Clean up Windows config_settingsGravatar Yun Peng2018-01-12
| | | | | | | | | | | | | | 1.Deleted config_setting for --cpu=x64_windows_msys, because we don't build Bazel with MSYS gcc anymore. 2.Deleted config_setting for --cpu=x64_windows_msvc, because it uses exactly the same toolchain as --cpu=x64_windows, it'll be removed in the future. This change reduces the complexity of our BUILD files and make them less confusing. Change-Id: I939831a6861413b0f745fb1be98aacd4fb780e0a PiperOrigin-RevId: 181751853
* Add toolchain_type definitions for JDK and JRE toolchains.Gravatar John Cater2018-01-12
| | | | | Change-Id: I61def9d449a8b05dde4f96983b84488a71be63a4 PiperOrigin-RevId: 181742031
* Add support for strip_prefix to {new_}git_repository skylark rulesGravatar Ed Baunton2018-01-10
| | | | | | | | | | | | Continuation of https://github.com/bazelbuild/bazel/pull/4356 An approach at supporting strip_prefix with the git skylark rules. This approach unfortunately uses symlinks since you cannot clone a subset of a git repository. It creates a tmp directory which is the 'real' clone and then provides a link in place of the expected location of the repository to the path of the required prefix. Behaviour is only changed if a strip_prefix is provided. Closes #4368. PiperOrigin-RevId: 181438640
* Use --depth=1 on git clone for git_repository skylark rulesGravatar Ed Baunton2018-01-08
| | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/4359 Closes #4360. PiperOrigin-RevId: 181161619
* fix git.bzl error when outputRoot is in a git repoGravatar kabakaev2018-01-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `_clone_or_update()` should `git clone` external repositories only if repo is absent. Unfortunately, it may happen that the bazel outputRoot (~/.cache/bazel by default) is a subdirectory of some other git working copy. For example, user may track his whole home directory in git and add `.config` to .gitignore. In that case, it is not enough to check if the cache dir is a git repo. One must check that the cache dir holds a root of a git working copy. In other words, the `.git` folder must be in the repo dir, not on any level above. * Steps to reproduce ```bash cd ~/.cache git init cd /some/project/that/uses/bazel-git_repository mv WORKSPACE WORKSPACE.orig (echo "load('@bazel_tools//tools/build_defs/repo:git.bzl', 'git_repository')" ; cat WORKSPACE.orig) > WORKSPACE bazel --batch build :all || echo "Ah, there is a bug" ``` Read on for definitive info. * clone any project that uses `git_repository` ```bash [arch@archlinux bazelbuild]$ git clone https://github.com/bazelbuild/bazel-watcher.git [arch@archlinux bazelbuild]$ cd bazel-watcher ``` * enable Skylark implementation of `git_repository` as documented in https://github.com/bazelbuild/bazel/issues/1408#issuecomment-276815467 ```bash [arch@archlinux bazel-watcher]$ mv WORKSPACE WORKSPACE.orig [arch@archlinux bazel-watcher]$ (echo "load('@bazel_tools//tools/build_defs/repo:git.bzl', 'git_repository')" ; cat WORKSPACE.orig) > WORKSPACE [arch@archlinux bazel-watcher]$ grep -v ^# WORKSPACE |head -n4 load('@bazel_tools//tools/build_defs/repo:git.bzl', 'git_repository') git_repository( name = "com_github_bazelbuild_bazel_integration_testing", ``` * (optionally) define custom Bazel `outputRoot` directory (default is ~/.cache/bazel) ```bash [arch@archlinux bazel-watcher]$ rm -rf /tmp/.cache/ ; mkdir /tmp/.cache/ [arch@archlinux bazel-watcher]$ export TEST_TMPDIR=/tmp/.cache/bazel ``` * try building the project to make sure everything works as expected ```bash [arch@archlinux bazel-watcher]$ bazel --batch build :all INFO: $TEST_TMPDIR defined: output root default is '/tmp/.cache/bazel' and max_idle_secs default is '15'. Extracting Bazel installation... WARNING: /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/com_github_bazelbuild_bazel_integration_testing/WORKSPACE:1: Workspace name in /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/com_github_bazelbuild_bazel_integration_testing/WORKSPACE (@build_bazel_integration_testing) does not match the name given in the repository's definition (@com_github_bazelbuild_bazel_integration_testing); this will cause a build error in future versions INFO: Analysed target //:go_prefix (6 packages loaded). INFO: Found 1 target... Target //:go_prefix up-to-date (nothing to build) INFO: Elapsed time: 15.088s, Critical Path: 0.05s INFO: Build completed successfully, 1 total action [arch@archlinux bazel-watcher]$ echo $? 0 ``` * reproduce the issue by placing the `outputRoot` under a git working copy ```bash [arch@archlinux bazel-watcher]$ rm -rf /tmp/.cache/ ; mkdir /tmp/.cache/ [arch@archlinux bazel-watcher]$ cd /tmp/.cache/ ; git init Initialized empty Git repository in /tmp/.cache/.git/ [arch@archlinux .cache]$ cd - [arch@archlinux bazel-watcher]$ bazel --batch build :all INFO: $TEST_TMPDIR defined: output root default is '/tmp/.cache/bazel' and max_idle_secs default is '15'. Extracting Bazel installation... ERROR: error loading package '': Encountered error while reading extension file 'tools/repositories.bzl': no such package '@com_github_bazelbuild_bazel_integration_testing//tools': Traceback (most recent call last): File "/tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/bazel_tools/tools/build_defs/repo/git.bzl", line 69 _clone_or_update(ctx) File "/tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/bazel_tools/tools/build_defs/repo/git.bzl", line 44, in _clone_or_update fail(("error cloning %s:\n%s" % (ctx....))) error cloning com_github_bazelbuild_bazel_integration_testing: + cd /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external + cd /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/com_github_bazelbuild_bazel_integration_testing + git reset --hard 55a6a70dbcc2cc7699ee715746fb1452788f8d3c fatal: Could not parse object '55a6a70dbcc2cc7699ee715746fb1452788f8d3c'. + git fetch origin 55a6a70dbcc2cc7699ee715746fb1452788f8d3c:55a6a70dbcc2cc7699ee715746fb1452788f8d3c fatal: 'origin' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. ERROR: error loading package '': Encountered error while reading extension file 'tools/repositories.bzl': no such package '@com_github_bazelbuild_bazel_integration_testing//tools': Traceback (most recent call last): File "/tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/bazel_tools/tools/build_defs/repo/git.bzl", line 69 _clone_or_update(ctx) File "/tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/bazel_tools/tools/build_defs/repo/git.bzl", line 44, in _clone_or_update fail(("error cloning %s:\n%s" % (ctx....))) error cloning com_github_bazelbuild_bazel_integration_testing: + cd /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external + cd /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/com_github_bazelbuild_bazel_integration_testing + git reset --hard 55a6a70dbcc2cc7699ee715746fb1452788f8d3c fatal: Could not parse object '55a6a70dbcc2cc7699ee715746fb1452788f8d3c'. + git fetch origin 55a6a70dbcc2cc7699ee715746fb1452788f8d3c:55a6a70dbcc2cc7699ee715746fb1452788f8d3c fatal: 'origin' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. INFO: Elapsed time: 4.974s FAILED: Build did NOT complete successfully (0 packages loaded) ``` * let's find out why it failed ```bash [arch@archlinux bazel-watcher]$ grep rev-parse /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/bazel_tools/tools/build_defs/repo/git.bzl if ! ( cd '{dir}' && git rev-parse --git-dir ) >/dev/null 2>&1; then [arch@archlinux bazel-watcher]$ cd /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/com_github_bazelbuild_bazel_integration_testing [arch@archlinux com_github_bazelbuild_bazel_integration_testing]$ git rev-parse --git-dir /tmp/.cache/.git [arch@archlinux com_github_bazelbuild_bazel_integration_testing]$ cd - ``` * let's fix git.bzl ```bash [arch@archlinux bazel-watcher]$ sed -i -E 's/git rev-parse --git-dir/[[ "$(git rev-parse --git-dir)" == '.git' ]]/' /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/bazel_tools/tools/build_defs/repo/git.bzl [arch@archlinux bazel-watcher]$ grep rev-parse /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/bazel_tools/tools/build_defs/repo/git.bzl if ! ( cd '{dir}' && [[ "$(git rev-parse --git-dir)" == .git ]] ) >/dev/null 2>&1; then ``` * make sure that Bazel works again ```bash [arch@archlinux bazel-watcher]$ ls -a /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/com_github_bazelbuild_bazel_integration_testing . .. [arch@archlinux bazel-watcher]$ bazel --batch build :all INFO: $TEST_TMPDIR defined: output root default is '/tmp/.cache/bazel' and max_idle_secs default is '15'. Error: corrupt installation: file '/tmp/.cache/bazel/_bazel_arch/install/f20169627a8110e2cc3d005319e97c94/_embedded_binaries/embedded_tools/tools/build_defs/repo/git.bzl' modified. Please remove '/tmp/.cache/bazel/_bazel_arch/install/f20169627a8110e2cc3d005319e97c94' and try again. [arch@archlinux bazel-watcher]$ touch -m -t 202712120101 /tmp/.cache/bazel/_bazel_arch/install/f20169627a8110e2cc3d005319e97c94/_embedded_binaries/embedded_tools/tools/build_defs/repo/git.bzl [arch@archlinux bazel-watcher]$ bazel --batch build :all INFO: $TEST_TMPDIR defined: output root default is '/tmp/.cache/bazel' and max_idle_secs default is '15'. WARNING: /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/com_github_bazelbuild_bazel_integration_testing/WORKSPACE:1: Workspace name in /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/com_github_bazelbuild_bazel_integration_testing/WORKSPACE (@build_bazel_integration_testing) does not match the name given in the repository's definition (@com_github_bazelbuild_bazel_integration_testing); this will cause a build error in future versions INFO: Analysed target //:go_prefix (6 packages loaded). INFO: Found 1 target... Target //:go_prefix up-to-date (nothing to build) INFO: Elapsed time: 13.318s, Critical Path: 0.07s INFO: Build completed successfully, 1 total action [arch@archlinux bazel-watcher]$ ls -a /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/com_github_bazelbuild_bazel_integration_testing . .. AUTHORS bazel_integration_test bazel_integration_test.bzl bazel_version.bzl BUILD .ci CODEOWNERS CONTRIBUTING.md .git .gitignore go java javatests LICENSE README.md tools WORKSPACE ``` Closes #4358. PiperOrigin-RevId: 181151078
* test_rules.bzl: Make Skylark rule forward compatibleGravatar David Ostrovsky2018-01-04
| | | | | | | This fixes "type 'depset' is not iterable. Use the `to_list()` method to get a list." warning. Change-Id: I10bd791ce15445469afb9e12b2246be583c77a4b
* Remove usages of `+` on dictsGravatar vladmos2018-01-03
| | | | | | | | | The `+` operator on dicts is deprecated and will be removed. This change makes Bazel files compatible with the new behavior. Fixes #4346. PiperOrigin-RevId: 180702882
* Refactor Windows C++ toolchain selectionGravatar Yun Peng2018-01-03
| | | | | | | | | | | | | | | | | | | We used to have --cpu=x64_windows_msys for selecting msys gcc toolchain, this is a misuse of --cpu flag. Instead, we should use --compiler flag to select C++ toolchain. For example, --compiler=msvc-cl, --compiler=msys-gcc, --compiler=mingw-gcc After this change, we can use mingw gcc toolchain by following steps: 1. In MSYS, install mingw by `pacman -S mingw-w64-x86_64-gcc` 2. Add /mingw64:/mingw64/bin into PATH 3. build with --compiler=mingw-gcc Related: https://github.com/bazelbuild/rules_go/issues/736 Change-Id: I4b5f77ce0698cfcafefe5d2ab17657f9c9e295d3 PiperOrigin-RevId: 180678829
* Use -no-canonical-prefixes when -fno-canonical-system-headers is not availableGravatar ibiryukov2018-01-02
| | | | | | | | | | | | Bazel's autoconf script adds -fno-canonical-system-headers to gcc's crosstool in order to get output in '.d' files that can be properly verified by bazel. To workaround the same issue in clang we have to use a different flag: '-no-canonical-prefixes'. The same issue arises with clang if it resides in the configured repository (e.g., when it is downloaded via 'repository_ctx.download'). PiperOrigin-RevId: 180552155
* Use relative paths for repository-local files in C++ crosstoolGravatar ibiryukov2018-01-02
| | | | | | | | | | | | | | | Generated crosstool previously used absolute paths for everything. However, when using a compiler, local to the repository (e.g., downloaded via 'repository_ctx.download'), relative paths should be used to avoid absolute paths that point into the crosstool repository. Specifically, this patch contains the following changes: 1. Replaces absolute paths in 'cxx_builtin_include' with relative if includes point inside the repository. 2. Removes the '-B<compiler-dir>' from 'compiler_flag' and 'linker_flag' sections when compiler is inside the repository. PiperOrigin-RevId: 180540359
* Enable switching def_parser's Windows target for remote executionGravatar Yun Peng2018-01-02
| | | | | | | | | | | | When --define EXECUTOR=remote is specified in bazel command, embedded tools 'def_parser' will be compiled remotely from source. Because def_parser itself is a cc_binary, if we want to compile it remotely, to avoid cycle dependency it cannot be a dependency of cc_toolchain. Therefore, we make it a dependency of cc rules. Change-Id: I77faf77238f8edd3585d0e5e5c780b14e9782a40 PiperOrigin-RevId: 180534568
* Retire the filegroup //tools/cpp:toolchain_category in favor of theGravatar cpeyser2017-12-21
| | | | | | cc_toolchain_type //tools/cpp:toolchain_type. PiperOrigin-RevId: 179818065
* Raise path error for failing read in GetTarFile.Gravatar Andreas Bergmeier2017-12-21
| | | | | | Closes #4282. PiperOrigin-RevId: 179783690