aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
Commit message (Collapse)AuthorAge
* Fixes compilation on Power8Gravatar davideleoni902017-05-15
| | | | | | | | This fixes #3000 Closes #3002. PiperOrigin-RevId: 156046356
* Adding feature for linking C Run-Time library on WindowsGravatar Yun Peng2017-05-12
| | | | | | | | | | | | | | | By default, we use /MT(/MTd for debug mode) and link to libcmt.lib(libcmtd.lib). Users can set USE_DYNAMIC_CRT=1 or add --action_env=USE_DYNAMIC_CRT=1 to switch to /MD and msvcrt.lib (/MDd and msvcrtd.lib for debug mode) Reference: https://msdn.microsoft.com/en-us/library/abx4dbyh.aspx Fixed https://github.com/bazelbuild/bazel/issues/2120 Change-Id: I61e65ace82163acd456bf82f2b108c5fe8d8a8ce PiperOrigin-RevId: 155850886
* Set the correct main class on the desugar java_binary target in Bazel.Gravatar ajmichael2017-05-10
| | | | | | | | | | | | | | | | | | This will make it easier to build the desugarer tool from the Bazel source tree as an executable (deploy) jar and then use it for something else. For example, with this CL, you can do the following steps to get a standalone desugarer binary: 1. git clone https://github.com/bazelbuild/bazel 2. bazel build //src/tools/android/java/com/google/devtools/build/android/desugar:desugar_bin_deploy.jar 3. cp bazel-bin/src/tools/android/java/com/google/devtools/build/android/desugar/desugar_bin_deploy.jar ~/bin/desugar.jar And then you can invoke desugar without bazel with `java -jar ~/bin/desugar.jar`. https://github.com/bazelbuild/bazel/issues/2975 RELNOTES: None PiperOrigin-RevId: 155629711
* Escape % in strings that will appear in CrosstoolGravatar hlopko2017-05-10
| | | | | | | | | | %foo% syntax is not allowed in Crosstool, but some Windows environment variables that we read in cc_configure.bzl can reference other variables, therefore in order not to crash, we need to escape them before putting the values into the Crosstool. RELNOTES: None. PiperOrigin-RevId: 155602425
* Migrate off versioned javac and Error Prone targetsGravatar Liam Miller-Cushon2017-05-09
| | | | | Change-Id: Iad1e07ad55d5304d7c3dbb8bdab856728a91432d PiperOrigin-RevId: 155375893
* Allow android compilations to use type annotationsGravatar cushon2017-05-08
| | | | PiperOrigin-RevId: 155287620
* Automated g4 rollback of commit 965617aebf4665b6a48229f32ab9a5ef7d4336c5.Gravatar Googler2017-05-05
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** rules_docker is again the default. *** Original change description *** Automated g4 rollback of commit 70d8c32e8f7b97413a4e88e219114c117deedb8b. *** 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: 155195712
* Add compile_jars for Skylark to JavaProviderGravatar Stephen Twigg2017-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add compile_jars Skylark accessor to JavaProvider. This outputs the non-recursive set of jars needed to build with this target. Allows Skylark tools to get the same set of compile_jars that JavaLibrary is getting. Added test that verifies Skylark was getting lists from both compile_jars and transitive_runtime_jars of the expected length. Then, verified (via test code) those nested sets were identical to the ones provided by the java_library. To reviewers: First, would like to add documentation flags to these fields in JavaProvider. Is it possible, instead of adding them to this map to follow use the @SkylarkCallable annotation to expose methods on JavaProvider instead? It would then also be nice to mark these as experimental since won't really know the final API until java_skylark_library sandwich is done. I also tested this locally via bazel build //src:bazel and then doing ~/bazelsandbox/bazel/bazel-bin/src/bazel test SomeTarget in a different repo that had a .bzl file trying to use compile_jars. Change-Id: I1779c1b6303f36e50076c3479bfcb15a25aa95d8 PiperOrigin-RevId: 155191816
* Improve error message when building Android rules without an SDK.Gravatar ajmichael2017-05-05
| | | | | | | | | | | | | | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/509. Example output: ``` $ bazel build //:all INFO: Found 1 target... ERROR: /usr/local/google/home/ajmichael/.cache/bazel/_bazel_ajmichael/7fcc7480abc634522e5c0cfe6b85b583/external/bazel_tools/tools/android/BUILD:236:1: Executing genrule @bazel_tools//tools/android:no_android_sdk_repository_error failed: Process exited with status 1 [sandboxed]. This build requires an Android SDK. Please add the android_sdk_repository rule to your WORKSPACE. Use --strategy=Genrule=standalone to disable sandboxing for the failing actions. Target //:lib failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 0.327s, Critical Path: 0.10s ``` RELNOTES: Attempting to build an Android target without setting up android_sdk_repository will now produce a helpful error message. PiperOrigin-RevId: 155158667
* Stop using zip and unzip in android shell tests.Gravatar ajmichael2017-05-04
| | | | | | | Also, open source two more tests. RELNOTES: None PiperOrigin-RevId: 155129416
* Remove debug print statement from proguard_whitelister.pyGravatar ahumesky2017-05-04
| | | | | RELNOTES: None. PiperOrigin-RevId: 155003333
* Rollforward #2 of: Basic open-source crosstool to support targeting apple ↵Gravatar cparsons2017-05-04
| | | | | | | platform types. RELNOTES: None. PiperOrigin-RevId: 154993630
* 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
* Automated g4 rollback of commit 5038016e6573962d2554fcf9c10faa0cca8714e2.Gravatar dmarting2017-05-02
| | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Broke rules_go and all its dependencies: http://ci.bazel.io/job/rules_web/BAZEL_VERSION=HEAD,PLATFORM_NAME=darwin-x86_64/464/console http://ci.bazel.io/job/rules_go/BAZEL_VERSION=HEAD,PLATFORM_NAME=darwin-x86_64/823/console http://ci.bazel.io/job/buildifier/BAZEL_VERSION=HEAD,PLATFORM_NAME=darwin-x86_64/557/console Bisected with `bazel build ...` in rules_go The error message is still -whole-archive appearing in rules_go. *** Original change description *** Rollforward of: Basic open-source crosstool to support targeting apple platform types. RELNOTES: None. PiperOrigin-RevId: 154825240
* 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
* Remove Scala IDE info, and use Java IDE info instead.Gravatar Googler2017-05-02
| | | | | | | | Scala IDE info is a subset of Java IDE info anyway, and would make reusing Java-specific utilities easier in the sync plugin. RELNOTES: None. PiperOrigin-RevId: 154728036
* Rollforward of: Basic open-source crosstool to support targeting apple ↵Gravatar cparsons2017-04-28
| | | | | | | platform types. RELNOTES: None. PiperOrigin-RevId: 154547417
* 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
* Reformat Bazel crosstools to have consistent 2 spaces indentGravatar hlopko2017-04-28
| | | | | RELNOTES: None. PiperOrigin-RevId: 154426101
* Add Scala IDE info to Intellij aspect.Gravatar Googler2017-04-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 154322648
* Parse /showIncludes output for MSVC compilerGravatar Yun Peng2017-04-25
| | | | | | | | Instead of parsing .d file generated by wrapper script, we directly parse the output of /showIncludes option. Change-Id: Id94e20a5cb05a494a793fd6a43756d44d27cea8a PiperOrigin-RevId: 154161939
* Introduce the osx bazel crosstool template, with placeholder for ↵Gravatar cparsons2017-04-25
| | | | | | | cxx_builtin_include_directory. RELNOTES: None. PiperOrigin-RevId: 154094961
* Update to javac9-r4023Gravatar cushon2017-04-25
| | | | PiperOrigin-RevId: 154078281
* Clean up more things in MSVC wrapper scriptsGravatar Yun Peng2017-04-24
| | | | | | | | | | | 1. Moved /nologo flag into feature 2. No need to specify -m64, adding /MACHINVE:X64 as linker flag 3. Still use wrapper script to add /MT or /MD for now, because our users are depending on it: https://github.com/bazelbuild/bazel/issues/2120 We need a plan first before move them into CROSSTOOL Change-Id: If5e4c01a900fcf9e93877e04a893879897bff3a3 PiperOrigin-RevId: 154036870
* MSVC: attempt to choose msvcrt.lib vs libcmt.lib correctlyGravatar Steven Johnson2017-04-24
| | | | | | | | | See Issue #2120: if we specify /MD for copts, we should attempt to use MSVCRTx.lib instead of LIBCMTx.lib. Closes #2862. PiperOrigin-RevId: 154032031
* 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
* Add missing dependency.Gravatar Googler2017-04-20
| | | | PiperOrigin-RevId: 153584278
* Move the sha256 tool into its own directory, as it isn't specific to ↵Gravatar Googler2017-04-19
| | | | | | docker_build. PiperOrigin-RevId: 153508081
* Automated g4 rollback of commit 501b62716af12ba42c019bd9f231468b3c144757.Gravatar aehlig2017-04-18
| | | | | | | | | | | | | | | *** Reason for rollback *** Broke //src/test/shell/bazel:cc_inc_library_test on darwin see http://ci.bazel.io/job/bazel-tests/BAZEL_VERSION=HEAD,PLATFORM_NAME=darwin-x86_64/704/console *** Original change description *** Basic open-source crosstool to support targetting apple platform types. RELNOTES: None. PiperOrigin-RevId: 153460334
* Generating PDB files on WindowsGravatar Yun Peng2017-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. Add /Z7 as compiler flag in CROSSTOOL, this causes full debugging infomation built into object files, no PDB file is generated. 2. Add /DEBUG as linker flag so that a PDB file will be generated for executable or dll. * /DEBUG:FULL for dbg mode. the full PDB can be used to debug the executable when no other build products are available, such as when the executable is deployed. * /DEBUG:FASTLINK for fastbuild mode. object files are still needed when debugging the executable, but linking speed can be two to four times faster that full PDB generation. * No option is added for opt mode. More detailed info: https://msdn.microsoft.com/en-us/library/xe4t6fc1.aspx 3. Add an empty feature in MSVC CROSSTOOL to tell Bazel we need PDB file 4. Add PDB file artifact in an output named pdb_file of cc_binary, then you can build the pdb file by bazel build //foo/bar:bin --output_groups=pdb_file 5. Add test for PDB file generation Change-Id: Ia5096470187ebca72f2c804f32d5b723f40c0b85 PiperOrigin-RevId: 153449059
* Basic open-source crosstool to support targetting apple platform types.Gravatar cparsons2017-04-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 153360877
* Expose Bazel's Android data binding support to users.Gravatar gregce2017-04-18
| | | | | | | | | | | | The logic is already in Bazel but wasn't available to build rules. This change makes it available, but still requires data binding's {build|run}time libraries to be checked into appropriate depot spots for everything to work. Followup changes will make those libraries easily available. Issue: #2694 PiperOrigin-RevId: 153359861
* Automated g4 rollback of commit 045104899738594d85f9ab9b0b9ccbde320b8055.Gravatar jfield2017-04-18
| | | | | | | | | | | | | *** Reason for rollback *** Breaks internal tests that use nonstandard crosstools *** Original change description *** Make C++ archiving use action_configs instead of hardcoded flags RELNOTES: Use action_config in crosstool for static library archiving, remove ar_flag. PiperOrigin-RevId: 153344597
* Move xcrunwrapper and libtool to third_party/bazel/tools/objc from their ↵Gravatar cparsons2017-04-14
| | | | | | | | | xcode src directories There's no value in having these copied over from src/tools to tools/objc separately. RELNOTES: None. PiperOrigin-RevId: 153060955
* Make C++ archiving use action_configs instead of hardcoded flagsGravatar hlopko2017-04-13
| | | | | RELNOTES: Use action_config in crosstool for static library archiving, remove ar_flag. PiperOrigin-RevId: 153046587
* Do not add a build id to C++ binaries by default.Gravatar lberki2017-04-13
| | | | | | | Fixes #2805. RELNOTES: None. PiperOrigin-RevId: 153039178
* Aspect-side compatibility with pending external workspace changes.Gravatar Googler2017-04-13
| | | | PiperOrigin-RevId: 152979269
* Make android_sdk_repository generate filegroups containing system image ↵Gravatar ajmichael2017-04-12
| | | | | | | | | | | | | | | | | | files for all android system images installed in the SDK. For system images that are not installed, create genrule "poison pills" that print a helpful error message if you attempt to build them. These filegroups are intended to be used as the system_image attribute of the android_device rule. Example: $ bazel build @android_test_support//tools/android/emulated_devices/pixel:android_25_x86 Extracting Bazel installation... . INFO: Found 1 target... ERROR: /usr/local/google/home/ajmichael/.cache/bazel/_bazel_ajmichael/efa32264346ef1fc4fec492202b88b31/external/androidsdk/BUILD.bazel:56:1: Executing genrule @androidsdk//:emulator_images_android_25_x86 failed: Process exited with status 1 [sandboxed]. This rule requires that the Android SDK used by Bazel has the following system image installed: emulator_images_android_25_x86. Please install this system image through the Android SDK Manager and try again. RELNOTES: None PiperOrigin-RevId: 152889824
* Copy swift.bzl into bazel_rules/rules_apple.Gravatar allevato2017-04-11
| | | | PiperOrigin-RevId: 152729637
* Add toolchain_rule to enable rule authors to define toolchains.Gravatar John Cater2017-04-11
| | | | | Change-Id: I407240708f4aacc89ec5c00bf3e8ff46a1d6d6d6 PiperOrigin-RevId: 152692981
* 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
* cc_configure: stricter error checks in _executeGravatar laszlocsomor2017-04-11
| | | | | | | | | | | | | | | | | Add stricter error checks in hopes of catching occasional CI flakiness where the stdout of a command seems to get lost. It's now an error if the command returns a non-zero exit code (or a zero one if it's expected to fail) or if its stdout is empty. Previously we only checked if stderr was empty to consider the action successful. See https://github.com/bazelbuild/bazel/issues/2675 RELNOTES: none PiperOrigin-RevId: 152685220
* Provide more information regarding compilerGravatar Eric Cousineau2017-04-10
| | | | | | | | | | | | | | | | | | | | This addresses #2761, to provide a minor improvement if neither `gcc` or `CC` are found on the path. Let me know if you would like anything changed! Local qualification steps: ``` $ cd bazel $ git rebase 0.4.5 # Did not want to spend too much time synchronizing derived stuff in master $ ln -s ~/Downloads/bazel-0.4.5-dist/derived . $ ./compile.sh $ export PATH=~+/output/bazel;$PATH $ cd .../someproject $ CC=clang-9000 bazel build //package:test Cannot find gcc or CC (clang-9000), either correct your path or set the CC environment variable. ``` Closes #2773. PiperOrigin-RevId: 152658002
* Suppress some warning messages from cc_configure.bzlGravatar Yun Peng2017-04-06
| | | | | | | Fixed https://github.com/bazelbuild/bazel/issues/2775 Change-Id: I4f5bab56ab961fd5310d62c7eee70abf9c98f9d9 PiperOrigin-RevId: 152359801
* Remove apkbuilder from Bazel's android_sdk.Gravatar ajmichael2017-04-06
| | | | | | RELNOTES: None PiperOrigin-RevId: 152292294
* Windows MSVC toolchain: Move environment variables setup from wrapper script ↵Gravatar Yun Peng2017-04-06
| | | | | | | to CROSSTOOL Change-Id: Ic6ee5a22412281743267a40623f4a8514a2e70f6 PiperOrigin-RevId: 152252048