aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
Commit message (Collapse)AuthorAge
* 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
* Simplify propagation of linker params by replacing global_whole_archive withGravatar Marcel Hlopko2016-12-09
| | | | | | | | individual --whole_archive/--no_whole_archive blocks. -- PiperOrigin-RevId: 141555295 MOS_MIGRATED_REVID=141555295
* Initial code for Persistent Java Test Runner.Gravatar Kush Chakraborty2016-12-09
| | | | | | | | | | | | At this point this does nothing more than re-run the exact same test without having to re-start the test runner. In future iterations the aim is to be able to re-run tests with modified code, without having to re-start the test runner. To test out the WorkerTestStrategy simply use --test_strategy=experimental_worker for a test with bazel. -- PiperOrigin-RevId: 141465929 MOS_MIGRATED_REVID=141465929
* Global cleanup change.Gravatar Kristina Chodorow2016-12-08
| | | | | | -- PiperOrigin-RevId: 141438562 MOS_MIGRATED_REVID=141438562
* Pass isExternal field to blaze ide info protoGravatar Googler2016-12-07
| | | | | | | | | | | | | | | | Roll forward after fixing tests. Changes from rolled-back CL: Native aspect now determines 'isExternal' identically to skylark aspect. RepositoryName.isMain was unreliable (at least in testing environment), because unknown repos (occurring due to some race condition) are flagged as being in the 'default' repo, distinct from the 'main' repo. We now bypass RepositoryName entirely, and use the same label string heuristic as used in the Skylark aspect. -- PiperOrigin-RevId: 141314075 MOS_MIGRATED_REVID=141314075
* Improved support for /MD and /MT in MSVC [#2120]Gravatar Javier Dehesa2016-12-07
| | | | | | | | | | | | | | | | | msvc_tools.py now prefers the last /MT / /MD option given; if none, /MD is preferred. Additionally, the behaviour of the copt -g has been improved to enforce the debug version of the user-selected runtime, not necessarily /MTd. Issue: #2120 Closes #2141. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/2141 PiperOrigin-RevId: 141294930 MOS_MIGRATED_REVID=141294930
* Windows: Fix cuda option parsing when /Od is passedGravatar Yun Peng2016-12-07
| | | | | | | | | | When not using -c opt, /Od will be passed instead of /O2 -- Change-Id: I693020d51d45e054e10a94a5e1754b89c44c7ff4 Reviewed-on: https://cr.bazel.build/7670 PiperOrigin-RevId: 141291490 MOS_MIGRATED_REVID=141291490
* move linker flags from compiler_flags to linker_flags; fix option syntaxGravatar Marcel Hlopko2016-12-07
| | | | | | | | | | | | | | | | | "-Wl,-z,-relro,-z,now" was in compiler_flags, which is not very useful because compiler_flags are not passed to the compilation driver for link commands. "-z -relro" is not even a valid linker flag set because of the spurious leading dash on "relro": $ gold -z -relro gold: -relro: unknown -z option -- Change-Id: Ic987312b7dec5cc68e7195b5ea88945653a93200 Reviewed-on: https://cr.bazel.build/7570 PiperOrigin-RevId: 141282978 MOS_MIGRATED_REVID=141282978
* Rollback of commit 14e35546302a48d1074bc2456ef4d63c27c9d3a1.Gravatar Adam Michael2016-12-07
| | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rollforward with fixes to android_integration_test.sh. The test now uses the new syntax for the Support Library AARs. All CIs that have been created since last December should have this library installed due to https://github.com/bazelbuild/continuous-integration/blob/master/mac/mac-android.sh#L36. *** Original change description *** Automated [] rollback of commit f699b502ef6a57dc68570486191ad1c318e8fd1b. *** Reason for rollback *** Breaks android_integration_test.sh which relies on the old targets. I don't have time to update the test to use the new targets at the moment, so rolling the change back for now. https://github.com/bazelbuild/bazel/issues/2159 RELNOTES: -- PiperOrigin-RevId: 141233182 MOS_MIGRATED_REVID=141233182
* 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
* Bazel uses apksigner from SDK build-tools instead of embedded jar.Gravatar Adam Michael2016-12-06
| | | | | | | | | | | | A followup change will remove the apksigner jar that is bundled with Bazel. RELNOTES: Bazel Android builds use the apksigner tool from the Android SDK build-tools. Bazel Android builds now require build-tools version 24.0.3 or later. -- PiperOrigin-RevId: 141181612 MOS_MIGRATED_REVID=141181612
* Rollback of commit 84e7bbc03d22a98e1036c9a3abf1d451e602348b.Gravatar Damien Martin-Guillerez2016-12-06
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** This change make AndroidStudioInfoAspectTest#testAndroidLibrary flaky bazel test --nocache_test_results --runs_per_test 10 //src/test/java/com/google/devtools/build/lib:ideinfo_test gives 2 to 3 failures out of 10 run. Fixes #2192 *** Original change description *** Pass isExternal field to blaze ide info proto Roll forward after fixing tests. The intellij aspect tests now correctly retains the required toolchain targets in the WORKSPACE file. -- PiperOrigin-RevId: 141174688 MOS_MIGRATED_REVID=141174688
* Pass isExternal field to blaze ide info protoGravatar Googler2016-12-06
| | | | | | | | | Roll forward after fixing tests. The intellij aspect tests now correctly retains the required toolchain targets in the WORKSPACE file. -- PiperOrigin-RevId: 141093346 MOS_MIGRATED_REVID=141093346
* Add LcovMerger.Gravatar Yue Gan2016-12-05
| | | | | | | | (series 2/4 of open-sourcing coverage command for java test) -- PiperOrigin-RevId: 141044216 MOS_MIGRATED_REVID=141044216
* Rollback of commit 9de9f374cf63e8e6938c9ce80820c9f46f641241.Gravatar Damien Martin-Guillerez2016-12-05
| | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Broke ci.bazel.io See http://ci.bazel.io/job/bazel-tests/BAZEL_VERSION=HEAD-jdk7,PLATFORM_NAME=linux-x86_64/379/console for error log. See https://cr.bazel.build/7610/ for tests that confirm fix. *** Original change description *** Pass isExternal field to blaze ide info proto -- Change-Id: Ieff9fbc719ea7baf8321bf50570fae5f7d6c7fdd Reviewed-on: https://cr.bazel.build/7610 PiperOrigin-RevId: 141029777 MOS_MIGRATED_REVID=141029777
* Pass isExternal field to blaze ide info protoGravatar Googler2016-12-02
| | | | | | -- PiperOrigin-RevId: 140862659 MOS_MIGRATED_REVID=140862659
* 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
* Rollback of commit f699b502ef6a57dc68570486191ad1c318e8fd1b.Gravatar Adam Michael2016-12-01
| | | | | | | | | | | | | | | *** Reason for rollback *** Breaks android_integration_test.sh which relies on the old targets. I don't have time to update the test to use the new targets at the moment, so rolling the change back for now. https://github.com/bazelbuild/bazel/issues/2159 RELNOTES: -- MOS_MIGRATED_REVID=140733556
* Enable fallback URLs in Skylark http rules.Gravatar David Chen2016-12-01
| | | | | | | RELNOTES: Enable fallback URLs in Skylark http rules. -- MOS_MIGRATED_REVID=140630438
* Add support for rules_test on rules in a different repository or in theGravatar John Cater2016-12-01
| | | | | | | | | root package. -- Change-Id: Ibbc4119ec65c27ad1f85a74450815195d18f5128 Reviewed-on: https://cr.bazel.build/7571 MOS_MIGRATED_REVID=140625048
* Delete old targets from android_sdk_repository_template.bzlGravatar Adam Michael2016-11-30
| | | | | | | | | | | | | | | | In December 2015, these JARs needed for these targets were removed from all subsequent Android SDK releases. They were replaced by a two local maven repositories: <android sdk>/extras/android/m2repository and <android sdk>/extras/google/m2repository. Furthermore, the new dependencies are AARs and the Maven repositories are sem-ver'd so the developer needs to select the version of the library to use. In https://github.com/bazelbuild/bazel/commit/2fcf0e I added support for android_sdk_repository to parse these local maven repositories and generate java_import and aar_import rules along with their dependencies. Since these "extras" do not ship with the SDK by default and are not versioned with the build-tools, you cannot currently download the old JAR versions. As such, anyone who has updated their Android SDK in the last year should not have been able to download the old JARs. See https://github.com/bazelbuild/bazel/issues/1745 for the tracking issue and information on migrating from the old targets to the new ones. RELNOTES: Top level @androidsdk support library targets have been replaced by @androidsdk//<group id>:<artifact id>-<version> for Android SDK Support and Google Play Services libraries. -- MOS_MIGRATED_REVID=140562616
* Rename android_studio_ide_info proto and members.Gravatar Googler2016-11-29
| | | | | | | | | android_studio_ide_info -> intellij_ide_info RuleIdeInfo -> TargetIdeInfo Drop "rule" from all sub-ide infos (eg. JavaRuleIdeInfo -> JavaIdeInfo) -- MOS_MIGRATED_REVID=140438983
* Remove legacy intellij_info test support.Gravatar Googler2016-11-29
| | | | | -- MOS_MIGRATED_REVID=140366543
* Rename intellij_info.bzl outputs and output groups.Gravatar Googler2016-11-28
| | | | | | | | | This will ensure that we can flip between the two smoothly, or even use both native and skylark aspect in the same command. This will make the transition smoother. -- MOS_MIGRATED_REVID=140219469
* cc_configure.bzl: Using registry information to find VSGravatar Yun Peng2016-11-28
| | | | | | | | | | | | | This change will find the latest installed VS by using reg.exe Also it gets rid of bash dependency in cc_configure.bzl Fix https://github.com/bazelbuild/bazel/issues/2100 -- Change-Id: I341e89b0d3ee76c39ea69d0e29904a0936d48338 Reviewed-on: https://cr.bazel.build/7533 MOS_MIGRATED_REVID=140201887
* Make //tols/cpp/test start from the distribution artifactGravatar Klaus Aehlig2016-11-24
| | | | | | | | | | | | | The docker tests in //tools/cpp/test still assume that the sources are enough to just compile.sh to bootstrap a bazel binary. Fix this, by using the distribution archive instead. While there, also add a target for the distribution archive as tar. -- Change-Id: Ic31bb95da0165f83a14537a1719c27e5067d0d65 Reviewed-on: https://cr.bazel.build/7531 MOS_MIGRATED_REVID=140134322
* Change handling of LD_LIBRARY_PATH in link actions: instead of passing the ↵Gravatar Lukacs T. Berki2016-11-24
| | | | | | | | | | | directories using a linker option, pass it in the environment instead. Fixes #2099. -- Change-Id: I9bff1888fbb211bc0853a68065b3098c4908c3d9 Reviewed-on: https://cr.bazel.build/7530 MOS_MIGRATED_REVID=140133329
* cc_configure.bzl: On Windows, make sure C:\windows\system32 is in PATHGravatar Yun Peng2016-11-24
| | | | | | | | | | | This change makes VCVARSALL.BAT work even with truncated path. Fixed https://github.com/bazelbuild/bazel/issues/2114 -- Change-Id: Ieaf38f6c5730fd7eeb784898a10746fe0359e81b Reviewed-on: https://cr.bazel.build/7455 MOS_MIGRATED_REVID=140129373
* Coverage support.Gravatar Ulf Adams2016-11-24
| | | | | | | | | | | | | | | | | - open source CoverageCommand.java - add a collect-coverage.sh script - update test-setup.sh to be compatible with the coverage collector - update StandaloneTestStrategy to provide the necessary env variables - update StandaloneTestStrategy to set the right command line for coverage - add support for C++ coverage An HTML report can then be generated with genhtml like this: genhtml -o report/ -p "$(readlink -f bazel-<project>)" path/to/coverage.dat Progress on #1118. -- MOS_MIGRATED_REVID=140125715
* Add gpu compile support to MSVC wrapper scriptGravatar Yun Peng2016-11-22
| | | | | | | | | | | | | | | | | | | | | | Fix https://github.com/bazelbuild/bazel/issues/2075 The logic for constructing nvcc options is from: third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl in TensorFlow repo. To make things configurable, this change makes cc_configure.bzl depend on more environment variables: CUDA_PATH: This variable points to Cuda installation directory CUDA_COMPUTE_CAPABILITIES: Specifiy cuda compute capabilities NO_WHOLE_ARCHIVE_OPTION: if set to 1, /WHOLEARCHIVE option won't be used. -- Change-Id: Ib1610a6d3423ca55a27c7a0f438703c05630a85c Reviewed-on: https://cr.bazel.build/7351 MOS_MIGRATED_REVID=139903436
* Rollback of commit cc3d79cca775cad9e9193d38bedf4df51a5c8a50.Gravatar Dmitry Lomov2016-11-21
| | | | | | | | | | | | | | *** Reason for rollback *** Breaks bazel: http://ci.bazel.build/job/bazel-tests/329/BAZEL_VERSION=HEAD,PLATFORM_NAME=linux-x86_64/console *** Original change description *** Support gold linker -- MOS_MIGRATED_REVID=139810019
* Move intellij_info.bzl to a tool packaged with bazel.Gravatar Googler2016-11-21
| | | | | | | | This will allow use of the Skylark IDE aspect in bazel, unblocking the migration away from the native aspect. -- MOS_MIGRATED_REVID=139796095
* 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
* Support gold linkerGravatar Marcel Hlopko2016-11-17
| | | | | | -- Reviewed-on: https://bazel-review.googlesource.com/c/7372/ MOS_MIGRATED_REVID=139432850
* resource_extractor.py should preserve the timestamps of entries of the input JARGravatar Adam Michael2016-11-17
| | | | | | | RELNOTES: -- MOS_MIGRATED_REVID=139370787
* Open source resource_extractor.py for singlejar apk building.Gravatar Adam Michael2016-11-16
| | | | | | | Now, apks can be built faster in Bazel using the --use_singlejar_apkbuilder flag. -- MOS_MIGRATED_REVID=139285943
* Stop running chained dead code removal commands if one of them fails.Gravatar Rumou Duan2016-11-11
| | | | | | | Also stop silently creating empty archives if the output archives do not exist (!). -- MOS_MIGRATED_REVID=138778978
* 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
* Make aar_embedded_jar_extractor.py not try to recreate the output directory.Gravatar Adam Michael2016-11-09
| | | | | -- MOS_MIGRATED_REVID=138516288
* Rollback of commit b043fafb957ae8038088e427ff27a5c9f951c979.Gravatar Carmi Grushko2016-11-08
| | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Use proto_lang_toolchain() in java_proto_library, after fixing breakage. Verified on Jenkins, http://ci.bazel.io/job/Gerrit-bazel-tests/169/ *** Original change description *** Automated [] rollback of commit a396b070ae36032a973672e11145533621c39edc. *** Reason for rollback *** Breaks tests on latest, as proto_lang_toolchain didn't make it into the 0.4.0 release see http://ci.bazel.io/job/bazel-tests/306/BAZEL_VERSION=latest,PLATFORM_NAME=linux-x86_64/console *** Original change description *** Use proto_lang_toolchain() in java_proto_library. -- MOS_MIGRATED_REVID=138432193
* msvc_tool.py: Don't replace \ with \\ in NormPathGravatar Yun Peng2016-11-08
| | | | | | | | | | | | No need to use double back slash. This could help ease the Windows long path issue. Please see https://github.com/tensorflow/tensorflow/pull/5385 -- Change-Id: Iecca529209499062bfc1351e3a2b46dc51e0be09 Reviewed-on: https://bazel-review.googlesource.com/#/c/7210 MOS_MIGRATED_REVID=138397390
* Rollback of commit a396b070ae36032a973672e11145533621c39edc.Gravatar Klaus Aehlig2016-11-07
| | | | | | | | | | | | | | | *** Reason for rollback *** Breaks tests on latest, as proto_lang_toolchain didn't make it into the 0.4.0 release see http://ci.bazel.io/job/bazel-tests/306/BAZEL_VERSION=latest,PLATFORM_NAME=linux-x86_64/console *** Original change description *** Use proto_lang_toolchain() in java_proto_library. -- MOS_MIGRATED_REVID=138372522
* 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
* Fixes for generating xcode-locator-bin on Tulsi.Gravatar Chris Parsons2016-11-07
| | | | | | | Clear certain environment variables on xcrun invocation to generate xcode-locator-bin, and provide additional error output if the invocation should fail. -- MOS_MIGRATED_REVID=138221908
* Use proto_lang_toolchain() in java_proto_library.Gravatar Carmi Grushko2016-11-04
| | | | | -- MOS_MIGRATED_REVID=138161512
* Moving files to final output location, instead of copying.Gravatar Rumou Duan2016-11-04
| | | | | -- MOS_MIGRATED_REVID=138104480
* Use proto_lang_toolchain in java_lite_proto_library.Gravatar Carmi Grushko2016-11-03
| | | | | -- MOS_MIGRATED_REVID=138005602