aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
Commit message (Collapse)AuthorAge
* Add aapt2 to the filegroup of integration test dependencies.Gravatar ajmichael2017-12-05
| | | | | | | | | This will allow us to write a bazel integration test for --android_aapt=aapt2. Necessary for https://github.com/bazelbuild/bazel/issues/4103. RELNOTES: None PiperOrigin-RevId: 177980382
* This and further changes may contain minor modifications to BUILD files that ↵Gravatar tomlu2017-12-05
| | | | | | | don't serve any apparent purpose. The reason for these changes is that we're switching from checked-in BUILD files to generated BUILD files, and there may be small differences between these files. RELNOTES: None PiperOrigin-RevId: 177949511
* Add a 'fdo_optimize' feature to the auto-configured crosstool.Gravatar Benjamin Peterson2017-12-05
| | | | | | | | | | | Bazel's fallback action config for PGO optimization uses Google-internal compiler flags. Here, we provide a 'fdo_optimize' feature without these internal flags, so --fdo_optimize can work out of the box. This fixes https://github.com/bazelbuild/bazel/issues/1171. Change-Id: I1d40eb72211e7c5bea213de7d2c237ac2877b3a1 PiperOrigin-RevId: 177947264
* Add a //tools/jdk:host_jdk target.Gravatar lberki2017-12-05
| | | | | RELNOTES: None. PiperOrigin-RevId: 177944402
* Remove `-R` flags from the MacOS crosstool template.Gravatar John Millikin2017-12-04
| | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/4028 Closes #4029. PiperOrigin-RevId: 177813419
* Add an open-source version of find_cpp_toolchain, to allow open-source users ofGravatar cpeyser2017-12-04
| | | | | | | | the CppConfiguration Skylark API to migrate to platforms and toolchains. For more details on toolchains, please see https://docs.google.com/document/d/1-G-VPRLEj9VyfC6VrQBiR8To-dZjnBSQS66Y4nargGM/edit#heading=h.al54v2ddwqzv PiperOrigin-RevId: 177811908
* Windows: Expose find_vc_path and find_msvc_tool functionGravatar Yun Peng2017-12-01
| | | | | | | | | | | | | | | find_vc_path and find_msvc_tool are now visible from windows_cc_configure.bzl, users can do: load("@bazel_tools//tools/cpp:windows_cc_configure.bzl", "find_vc_path" "find_msvc_tool") to get Visual C++ path and find Visual C++ tools detected by Bazel in their repository rule. Change-Id: Ifb6d1f412e64251f413a59d3149d44ca2f8bc5d7 PiperOrigin-RevId: 177589321
* Move bazel conditions into src/conditions.Gravatar tomlu2017-11-30
| | | | | | | This will enable an easier transition from checked-in BUILD files to ones generated by copybara. RELNOTES: None PiperOrigin-RevId: 177514519
* Revert name of coverage_suppot to coverage_support.Gravatar cparsons2017-11-29
| | | | | | | The previous change was accidental. RELNOTES: None. PiperOrigin-RevId: 177330228
* Create the output source jar in java_common.compileGravatar elenairina2017-11-29
| | | | | | | | | | | | | | | | | and expose transitive source jars to Skylark. Initial change was rolled back (unknown commit). java_common.compile wouldn't fill the JavaRuleOutputJarsProvider when there was only one input source jar. Fixed that and added test (there was one before, but didn't check this particular provider). Slightly refactor java classes to take in specific host javabase inputs and host java executable for creating the source jar, instead of always relying on fetching them from native java rules specific attributes. Creating the output source jar in java_common.compile makes the behavior more similar to java_library. Exposing the transitive_source_jars to Skylark helps with the Skylark migration from the old 'java' provider to JavaInfo. Progress on #2614. RELNOTES: transitive_source_jars is now exposed on JavaInfo. PiperOrigin-RevId: 177311138
* Expressly fetch remote and ref when using git_repositoryGravatar Ed Baunton2017-11-29
| | | | | | | | | | | | | | | | When I clone from a git repo that doesn't have the default branch the same as the branch that I want ; it doesn't seem to fetch the appropriate branch. I am using a name rather than explicit sha. What happens is: ``` + git reset --hard build-with-bazel fatal: ambiguous argument 'build-with-bazel': unknown revision or path not in the working tree. ``` because it hasn't fetched that ref. Closes #4039. PiperOrigin-RevId: 177298578
* Handle spaces in absolute paths to tests.Gravatar Seth Greenstein2017-11-29
| | | | | | | | | | | | | | | | | | | | | | This allows for output_base paths that contain spaces, fixing #3897 The test path is set by grepping the MANIFEST, in which each line is a space-separated 2-tuple of relative path and absolute path to the test. Replace the awk command that extracts the second item in the space-separated list with a sed command that extracts everything after the first space. Also, quote the manifest path arg to the grep command. There will still be problems if there are spaces in the relative path, below the Bazel project root. Test: Built and tested a test with an output_base containing a space. Change-Id: I5dba285bb50c27eedace17a5e20efac7392a9a6e Closes #3899. Change-Id: I5dba285bb50c27eedace17a5e20efac7392a9a6e PiperOrigin-RevId: 177283695
* Various Shell Script Fixes and Improvements - Part OneGravatar Androbin2017-11-29
| | | | | | | | see #4023 Closes #4051. PiperOrigin-RevId: 177279457
* Remove uses of ar_flag and uses_action_config_for_arGravatar hlopko2017-11-23
| | | | | | | Bazel is not reading its value anyway. RELNOTES: None PiperOrigin-RevId: 176768851
* Automated rollback of commit 0ebb3e54fc890946ae6b3d059ecbd50e4b5ec840.Gravatar dmarting2017-11-22
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Cause rare case of test hanging. To cherry-pick for #3772 *** Original change description *** Attempting to fix an occasionally missing stdout from test.xml. In hello-world_test, when executed inside a docker container, for about 2% of the runs the test.xml has an empty CDATA, instead of the expected "Hello, world!". I'm not sure still what exactly was the bug, but in any case this change simplifies the test execution code line, so if this doesn't fix it, at least further debugging will be easier. I ran the test in a loop 1360 times, and the error did not reproduce once, which hints to... *** PiperOrigin-RevId: 176662654
* Windows CROSSTOOL: Define DEBUG in fastbuild and dbg modeGravatar pcloudy2017-11-22
| | | | | RELNOTES: None PiperOrigin-RevId: 176646230
* Windows CROSSTOOL: Define NDEBUG in opt modeGravatar pcloudy2017-11-22
| | | | | | | Fixed https://github.com/bazelbuild/bazel/issues/4144 RELNOTES: None PiperOrigin-RevId: 176642833
* Remove java_toolchain using remote targets.Gravatar xingao2017-11-21
| | | | PiperOrigin-RevId: 176521744
* Update/Add license header to cc auto-configure templates.Gravatar xingao2017-11-21
| | | | PiperOrigin-RevId: 176510846
* Fix gflags mark_flag_as_required warning.Gravatar Austin Schuh2017-11-21
| | | | | | | | | | | | I'm getting .../bazel-out/host/bin/external/bazel_tools/tools/build_defs/pkg/make_deb.runfiles/bazel_tools/third_party/py/gflags/gflags/__init__.py:284: UserWarning: Flag architecture has a non-None default value; therefore, mark_flag_as_required will pass even if flag is not specified in the command line! 'command line!' % flag_name) So, let's not mark it as required if a default is passed in! Change-Id: Iad9a3886ce0ff21ce26eb7fa17a986be4c4af5cf PiperOrigin-RevId: 176480367
* Add 'assemble' action_config for Windows.Gravatar Seth Greenstein2017-11-17
| | | | | | | | | | | Allows .asm files to be included in srcs. ml64.exe is used to create .o files which can later be linked. However, this change will not allow custom flags to be passed to ml64.exe other than /I and /D. Fixes #3648 Closes #3887. Change-Id: I42b6ff76d526abed440bb7f0e0ed4cc3812b4893 PiperOrigin-RevId: 176085382
* Build databinding annotation processor in host configuration.Gravatar ajmichael2017-11-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, add a fake databinding processor target. Bazel users will need to do something like this: # WORKSPACE local_repository( name = "databinding", path = "./databinding", ) bind( name = "databinding_annotation_processor", actual = "@databinding//:annotation_processor", ) # databinding/BUILD java_plugin( name = "annotation_processor", ... ) ... https://github.com/bazelbuild/bazel/issues/2694 RELNOTES: None PiperOrigin-RevId: 175975110
* Add deps attributes to the Skylark maven_{a,j}ar rules.Gravatar ajmichael2017-11-14
| | | | | | | | | | | | | | | | | | | | | | | | | | The deps are passed through into the generated java_import and aar_import rules. This is necessary for AARs with resource dependencies since maven_aar ignores transitive dependencies. It's less significant for the Java rules, since typically JARs on Maven are compiled class files and as such only have runtime dependencies. Example usage: ``` # WORKSPACE load("@bazel_tools//tools/build_defs/repo:maven_rules.bzl", "maven_aar") maven_aar( name = "android_image_cropper", artifact = "com.theartofdev.edmodo:android-image-cropper:2.3.1", deps = [ "@androidsdk//com.android.support:appcompat-v7-24.1.1", ], ) ``` Fixes https://github.com/bazelbuild/bazel/issues/2863. Fixes https://github.com/bazelbuild/bazel/issues/3980. Also, cleans up some broken stuff in the tests (sadly, they don't run on jenkins, so nothing caught that they were broken). test_maven_jar_with_classifier_skylark still does not work, so I disabled. RELNOTES: Add deps attribute to Skylark maven_aar and maven_jar workspace rules. PiperOrigin-RevId: 175698282
* msvc_cl.py: Remove code for adding /MT /MD options from wrapper script.Gravatar pcloudy2017-11-14
| | | | | | | | The wrapper script is now only necessary for TensorFlow GPU build. Since the link option for MSVCRT is controlled by CROSSTOOL, we should remove the hack in wrapper script to avoid conflict. RELNOTES: None PiperOrigin-RevId: 175664202
* Add win_def_file attribute to cc rules.Gravatar Yun Peng2017-11-14
| | | | | | | | RELNOTES[NEW]: Users can use win_def_file attribute to specify a DEF file for exporting symbols when build a shared library on Windows. Change-Id: Ifa28d8b7b24eaefcefc9640d8dc56fd2931e9688 PiperOrigin-RevId: 175651203
* Open source ZipFilterBuilder for android_instrumentation_testGravatar jingwen2017-11-13
| | | | | | | GITHUB: #903 RELNOTES: None. PiperOrigin-RevId: 175600267
* Update java.bzl best practices regarding HTTPSGravatar jart2017-11-10
| | | | | | | | | | | While HTTP is faster and SHA256 already guaranteed data hasn't been tampered with, it does give visibility over the wire regarding which jars are being transmitted. The true purpose of this change is to bring these practices into greater consistency with Google's broader vision of using HTTPS as much as possible. PiperOrigin-RevId: 175328286
* Remove bazel's --experimental_skip_static_outputs option.Gravatar Googler2017-11-10
| | | | | | | | | | | It was added long ago, for reasons which are no longer relevant or useful. Also remove the build variable it controlled ("skip_mostly_static") from CROSSTOOL files. RELNOTES: None. PiperOrigin-RevId: 175325225
* Introduce cc_toolchain_type, which exports c++ make variables. UseGravatar cpeyser2017-11-07
| | | | | | //tools/cpp:toolchain_type as the canonical c++ toolchain. PiperOrigin-RevId: 174759558
* Fix ImportError on tools.android for junction_libGravatar jingwen2017-11-06
| | | | | RELNOTES: None. PiperOrigin-RevId: 174503874
* Export hash.bzl.Gravatar Nathan Herring2017-11-03
| | | | | | | | This allows Skylib `skylark_library` users to use `hash.bzl` as a file dependency without the base Bazel rules having to import the actual `skylark_library` rule from Skylib. Closes #4000. PiperOrigin-RevId: 174337147
* Enable switching singlejar and ijar targets for remote execution.Gravatar xingao2017-11-02
| | | | | | When --define EXECUTOR=remote is specified in bazel command, embedded tool singlejar and ijar will be compiled remotely from source. PiperOrigin-RevId: 174195094
* Alias recently added tool as //tools/android:dexsharder for use by BazelGravatar kmb2017-11-01
| | | | | | RELNOTES: None. PiperOrigin-RevId: 174124176
* Adds "-fno-autolink" to ObjC compilation actions to avoid using the autolink ↵Gravatar kaipi2017-10-27
| | | | | | feature, as it doesn't play very well with bazel's deduplication of shared dependencies. PiperOrigin-RevId: 173531808
* Android,Windows: longpath support in toolGravatar Laszlo Csomor2017-10-24
| | | | | | | | | | Update aar_native_libs_zip_creator.py to support long paths by using junctions. See https://github.com/bazelbuild/bazel/issues/3955 Change-Id: Iafa9ceca9f2a9076f220bd6326c95e5fb8b27f63 PiperOrigin-RevId: 173244903
* Automated rollback of commit e9b10399f6a148a3d20442f2c5020b05fa891873.Gravatar twerth2017-10-24
| | | | | | | | | | | | *** Reason for rollback *** Breaks ~2k ios targets, see b/68179560 *** Original change description *** Move hard-coded compilation-mode-specific flags in ObjcConfiguration. PiperOrigin-RevId: 173239463
* Add java_toolchain which compiles singlejar and ijar from source.Gravatar xingao2017-10-24
| | | | PiperOrigin-RevId: 173178028
* Move hard-coded compilation-mode-specific flags in ObjcConfiguration.Gravatar cpeyser2017-10-23
| | | | PiperOrigin-RevId: 172932367
* Minor update to a docstring.Gravatar lberki2017-10-23
| | | | | RELNOTES: None. PiperOrigin-RevId: 172880849
* Strip Xcode versions like "9.0gm" for the version flag.Gravatar lberki2017-10-20
| | | | | | | Turns out, those exist. RELNOTES: None. PiperOrigin-RevId: 172768102
* Add Skylark code that exports the current Xcode version and the Apple SDK ↵Gravatar lberki2017-10-18
| | | | | | | | | | | versions as flags. This will serve to replace AppleConfiguration#lateBoundOptionDefaults(). That one has to go away so that AppleConfiguration doesn't need to know the contents of the xcode_config rule anymore. Progress towards #3424. RELNOTES: None. PiperOrigin-RevId: 172569961
* Add aapt2 to Bazel-generated android_sdks.Gravatar ajmichael2017-10-18
| | | | | RELNOTES: None PiperOrigin-RevId: 172481590
* Windows: genenrate a fake CROSSTOOL when VC not foundGravatar Yun Peng2017-10-18
| | | | | | | | | | | | | | | | When Visual C++ build tools are not found on Windows, we generating a fake CROSSTOOL so that users can still build for other languages. In the fake CROSSTOOL, we point all tools to a batch script which prints error messages to notify users when they try to build any cc targets. Also, added an extra default_toolchain specification for x64_windows cpu value, so that users can use this cpu in select on non-Windows platforms. Fixed https://github.com/bazelbuild/bazel/issues/3853 Change-Id: Ib4d7a38fd4d98075f6b73ce310c28822e58af4e2 PiperOrigin-RevId: 172341985
* Removing the USER variable from test environment, unless explicitly provided.Gravatar olaola2017-10-16
| | | | | | TESTED=added remote test RELNOTES: Fixes #2574 PiperOrigin-RevId: 172294781
* Add a missing argument to the code in ↵Gravatar lberki2017-10-16
| | | | | | | | | https://github.com/bazelbuild/bazel/commit/aee6fb8d21e17c855025f0db6bb52e2cd7a2f642. Progress towards #3424. RELNOTES: None. PiperOrigin-RevId: 172293805
* Fix osx_cc_wrapper to also update dylibsGravatar hlopko2017-10-13
| | | | | | | | | | | | | | | In https://github.com/bazelbuild/bazel/commit/f426544e67170d31b9d228ecf4cdc4b6ce1ba00d I updated osx_cc_wrapper to work correctly in case both precompiled .so and cc_library-made .so are linked into a single binary. This cl makes osx_cc_wrapper work also when a precompiled .dylib is provided. This is roll-forward of https://github.com/bazelbuild/bazel/commit/0257c29f496719bb8414d012334155de6bbefa11. Fixes #3450 again for dylibs Fixes #407 One step closer to finishing #1576 RELNOTES: None. PiperOrigin-RevId: 171969333
* Update the Apple rules according to the new API because it was deemed better toGravatar lberki2017-10-12
| | | | | | | | | put the environment data behind apple_common as opposed to xcode_config. Progress towards https://github.com/bazelbuild/bazel/issues/3424 . RELNOTES: None. PiperOrigin-RevId: 171931324
* Automated rollback of commit 0257c29f496719bb8414d012334155de6bbefa11.Gravatar hlopko2017-10-11
| | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** I broke http://ci.bazel.io/view/Dashboard/job/bazel-tests/1079/testReport/junit/(root)/(empty)/test_osx_cc_wrapper_rpaths_handling/ *** Original change description *** Fix osx_cc_wrapper to also update dylibs In https://github.com/bazelbuild/bazel/commit/f426544e67170d31b9d228ecf4cdc4b6ce1ba00d I updated osx_cc_wrapper to work correctly in case both precompiled .so and cc_library-made .so are linked into a single binary. This cl makes osx_cc_wrapper work also when a precompiled .dylib is provided. Fixes #3450 again for dylibs Fixes #407 One step closer to finishing #1576 RELNOTES: None. PiperOrigin-RevId: 171806769
* Add tests for the Skylark-based implementation of git repository rules.Gravatar John Cater2017-10-11
| | | | | | | Fixes #3825. Change-Id: I59cb0edb50af30991153a1a684e613853df22dd2 PiperOrigin-RevId: 171687620
* Fix osx_cc_wrapper to also update dylibsGravatar hlopko2017-10-11
| | | | | | | | | | | | | In https://github.com/bazelbuild/bazel/commit/f426544e67170d31b9d228ecf4cdc4b6ce1ba00d I updated osx_cc_wrapper to work correctly in case both precompiled .so and cc_library-made .so are linked into a single binary. This cl makes osx_cc_wrapper work also when a precompiled .dylib is provided. Fixes #3450 again for dylibs Fixes #407 One step closer to finishing #1576 RELNOTES: None. PiperOrigin-RevId: 171683650