aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main
Commit message (Collapse)AuthorAge
* Update the Bazel docs for java_binary and java_test to give more information ↵Gravatar Googler2016-12-21
| | | | | | | | on how the "launcher" attribute affects builds. -- PiperOrigin-RevId: 142619261 MOS_MIGRATED_REVID=142619261
* Remove dead code referencing deleted "suites" attribute.Gravatar Greg Estren2016-12-21
| | | | | | | | | This used to be how test_suites depended on other test_suites. Now they just go in "tests". -- PiperOrigin-RevId: 142607603 MOS_MIGRATED_REVID=142607603
* Introduce a distinguisher for cpu value as set in --experimental_multi_cpu.Gravatar Cal Peyser2016-12-21
| | | | | | | | | This is required for a configuration transtion to set cpu. Without a distinguisher, such a transition will lead to two identical configurations. -- PiperOrigin-RevId: 142603930 MOS_MIGRATED_REVID=142603930
* Cast to ConfiguredTarget instead of AbstractConfiguredTarget for obtaining ↵Gravatar Chris Parsons2016-12-21
| | | | | | | | | | the target type This allows us to correctly analyze the type of alias targets -- PiperOrigin-RevId: 142582188 MOS_MIGRATED_REVID=142582188
* Set last modified time when files are extractedGravatar Kristina Chodorow2016-12-21
| | | | | | | | Part of rolling forward commit b9f914fa56a00530d38b597dc853aad50d1decfb. -- PiperOrigin-RevId: 142576787 MOS_MIGRATED_REVID=142576787
* Rollback of commit e0a330577d9fe98169645cb68d9fc22cc787eeb6.Gravatar Janak Ramakrishnan2016-12-21
| | | | | | | | | | *** Reason for rollback *** Investigating if causes deadlock/thread starvation. -- PiperOrigin-RevId: 142575769 MOS_MIGRATED_REVID=142575769
* Power supportGravatar Nishidha Panpaliya2016-12-21
| | | | | | | | | Closes #2139. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/2139 PiperOrigin-RevId: 142570236 MOS_MIGRATED_REVID=142570236
* Revert "Revert "Fix repositories to use 'BUILD.bazel' as the name for the ↵Gravatar John Cater2016-12-21
| | | | | | | | | | | | symlinked/new build file, which has less changes of causing conflicts. Fixes #2226."" This reverts commit fa3f55a8785c28253b2f836ddc84e994e48edd7f. -- Change-Id: Ife393ebf4966cfaf2a487c80c67a781ca7ee69b0 Reviewed-on: https://cr.bazel.build/8051 PiperOrigin-RevId: 142555911 MOS_MIGRATED_REVID=142555911
* Disable sandboxing for XibCompile actions.Gravatar Philipp Wollermann2016-12-21
| | | | | | | | | | Fixes #2189. The other idea of making the path that ibtoold wants to write to read-write in the sandbox strategy didn't seem to help (but I don't know why) - it randomly works or doesn't work, with or without that change. -- PiperOrigin-RevId: 142553982 MOS_MIGRATED_REVID=142553982
* Add customized path mounting in Bazel sandbox.Gravatar Xin Gao2016-12-20
| | | | | | | | | | RELNOTES: New flag --sandbox_add_mount_pair to specify customized source:target path pairs to bind mount inside the sandbox. -- Change-Id: Ifbacfc0e16bbaedcf5b6d3937799710f2cfa3d58 Reviewed-on: https://cr.bazel.build/7150 PiperOrigin-RevId: 142542381 MOS_MIGRATED_REVID=142542381
* WindowsFileSystem: use JNI impl. of isJunctionGravatar Laszlo Csomor2016-12-20
| | | | | | | | | | | | | | | | | | | Also build the JNI library while bootstraping. This was once submitted in commit 4a249b6962d32ed4cfd4165dfdae4a555b00bb69 but got rolled back due to some test breakage that's long since fixed. In this change I'm slightly modifying the original code in compile.sh. Using JNI methods however is necessary because we can't implement WindowsFileOperations.GetLongPath in native Java, and having that code is a prerequisite for the fix of https://github.com/bazelbuild/bazel/issues/2145 See also https://github.com/bazelbuild/bazel/issues/2238 -- PiperOrigin-RevId: 142535019 MOS_MIGRATED_REVID=142535019
* Gives detailed error message when fail to re-create directories during ↵Gravatar Yue Gan2016-12-20
| | | | | | | | | | testing. Also fixes bazel_test_test. Fixes #2228. -- PiperOrigin-RevId: 142532524 MOS_MIGRATED_REVID=142532524
* Bazel client, Windows: implement AsWindowsPathGravatar Laszlo Csomor2016-12-20
| | | | | | | | | | | | | | | | | | | | This method converts MSYS paths to Windows path. It uses the BAZEL_SH envvar to obtain the MSYS root directory, to which all Unix paths (except for mounts) are relative. We cannot handle mounts because we don't want to read /etc/mtab every time there's a file operation so we simply apply a heuristic similar to https://github.com/bazelbuild/bazel/blob/cd4cc09fa6ef96380a3d0888f825dfd1dbada651/src/main/java/com/google/devtools/build/lib/vfs/WindowsFileSystem.java#L52-L63 Also clean up the #ifdefs surrounding SyncFile. See https://github.com/bazelbuild/bazel/issues/2107 -- PiperOrigin-RevId: 142531986 MOS_MIGRATED_REVID=142531986
* Avoids NullPointerException when running `bazel coverage //:xxx`, since ↵Gravatar Yue Gan2016-12-20
| | | | | | | | | | PathFragment.getParentDirectory() may return null. Fixes #2212. Also adds coverage-specific attributes to the java_binary rule. -- PiperOrigin-RevId: 142516883 MOS_MIGRATED_REVID=142516883
* Update call sites to FileWriteAction to use the ↵Gravatar Jon Brandvein2016-12-20
| | | | | | | | | | --experimental_transparent_compression flag Also add test to ensure lazy strings aren't forced. -- PiperOrigin-RevId: 142496520 MOS_MIGRATED_REVID=142496520
* Cleanup FileWriteAction and add a flag that will guard transparent compressionGravatar Jon Brandvein2016-12-20
| | | | | | | | This clarifies documentation, renames or rearranges constructors, and defines a BuildConfiguration option that will be made to control transparent compression in a follow-up CL. The follow-up updates call sites to use the new create() factory method. -- PiperOrigin-RevId: 142491333 MOS_MIGRATED_REVID=142491333
* Make android_sdk_repository build_tools_version attribute optional.Gravatar Adam Michael2016-12-20
| | | | | | | | | | | | If none is specified, the highest version installed in <sdk>/build-tools/ will be used. RELNOTES: android_sdk_repository build_tools_version is now optional. The highest installed build-tools will be used if none is specified. -- PiperOrigin-RevId: 142490569 MOS_MIGRATED_REVID=142490569
* 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
* Bazel client: fix build on WindowsGravatar Laszlo Csomor2016-12-19
| | | | | | | | | | | | | | Broken by https://github.com/bazelbuild/bazel/commit/a4d0ea406e8622e305fc3253075cfee60da3d3d2 Reason is that we include both file_posix.cc and file_windows.cc when compiling for MSYS, and I forgot to put the POSIX implementation of SplitPath/IsAbsolute/IsRootDirectory behind `#ifndef __CYGWIN__`. -- PiperOrigin-RevId: 142456232 MOS_MIGRATED_REVID=142456232
* 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
* Bazel client: generalize path handlingGravatar Laszlo Csomor2016-12-19
| | | | | | | | | | | | | | Use/implement utility methods to join paths, check if they are the root directory or are absolute, etc. Doing so (instead of say checking if a path starts with "/") allows for correct behavior on Windows. See https://github.com/bazelbuild/bazel/issues/2107 -- PiperOrigin-RevId: 142446027 MOS_MIGRATED_REVID=142446027
* Bazel client: SplitPath works with Windows pathsGravatar Laszlo Csomor2016-12-19
| | | | | | | | | | | This allows correct behavior of Dirname and Basename on Windows. See https://github.com/bazelbuild/bazel/issues/2107 -- PiperOrigin-RevId: 142441234 MOS_MIGRATED_REVID=142441234
* Fix bug introduced when pulling out test sources into their own library forGravatar Googler2016-12-19
| | | | | | | | | | linking. This can lead to conflicts if done for non-test binary targets. -- PiperOrigin-RevId: 142441056 MOS_MIGRATED_REVID=142441056
* Add a new AST node for augmented assignments in SkylarkGravatar Vladimir Moskva2016-12-19
| | | | | | -- PiperOrigin-RevId: 142438943 MOS_MIGRATED_REVID=142438943
* Windows JNI: remove dead code, extract constantGravatar Laszlo Csomor2016-12-19
| | | | | | -- PiperOrigin-RevId: 142430323 MOS_MIGRATED_REVID=142430323
* Fixes invocation policy to correctly apply allow/disallow policies to flagsGravatar Alex Humesky2016-12-16
| | | | | | | | | | | | | which have converters that return lists. The problem was that the policy might, say, disallow values ["a", "b"], and a flag --foo might have a converter which takes a string and splits it by commas to produce a list. The options parser would apply the converter to --foo=a,b to produce ["a", "b"], but invocation policy would compare each element of the policy to the list itself, which will never work. -- PiperOrigin-RevId: 142297177 MOS_MIGRATED_REVID=142297177
* Add some logging when query evaluation halts abruptly.Gravatar Nathan Harmata2016-12-16
| | | | | | -- PiperOrigin-RevId: 142295816 MOS_MIGRATED_REVID=142295816
* Fix build documentation for C++ includesGravatar Googler2016-12-16
| | | | | | | | | | | Blaze and Bazel each use -isystem rather than -I when specifying "includes" for cc_* rules. This distinction matters, e.g. for which warnings are enabled. Update documentation to reflect the current state of the world. RELNOTES: Update "-I" to "-isystem" in documentation to reflect current behavior. -- PiperOrigin-RevId: 142290840 MOS_MIGRATED_REVID=142290840
* sandbox: Make ~/Library/{Cache,Logs} writable on macOS.Gravatar Philipp Wollermann2016-12-16
| | | | | | | | Fixes #2231. -- PiperOrigin-RevId: 142266332 MOS_MIGRATED_REVID=142266332
* Names of extra-action protos now take into account all aspect names.Gravatar Dmitry Lomov2016-12-16
| | | | | | | | | | | | | If an Aspect registered an action that an extra-action is shadowing, its name is used when creating the extra-action's ID and name. Since recently, an aspect can see other aspects applied to the same target. This CL record the names of other aspects applied to the target as well, disambiguating the action owners. -- PiperOrigin-RevId: 142264153 MOS_MIGRATED_REVID=142264153
* Rollback of commit 52b34308428cfd117470c966d8df329f686fb9ed.Gravatar Marcel Hlopko2016-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rolling forward, cl fixing underlying issue is uploaded, will land this one as soon as I get lgtm to the fix from emscripten crosstool owners. *** Original change description *** Automated [] rollback of commit 2d87bf1937c81ef84358fd5f6a372875f6c6fabf. *** Reason for rollback *** We have to roll back unknown commit, on which this one depends. Will resubmit after I fix the underlying issue. *** Original change description *** Support versioned shared library targets for cc_binary linkshared=1 This change allows versioned shared libraries (e.g. "libfoo.so.1.2") to be built and linked. -- PiperOrigin-RevId: 142263653 MOS_MIGRATED_REVID=142263653
* Creating separate instances of CAS and execution handlers for every action. ↵Gravatar Ola Rozenfeld2016-12-16
| | | | | | | | | | This allows Bazel to talk to multiple instances of the server, if these exist, enabling server-side parallelism (due to using separate gRPC channels). TESTED: internally and local server -- PiperOrigin-RevId: 142262973 MOS_MIGRATED_REVID=142262973
* Fix formatting of README.mdGravatar Tom Payne2016-12-16
| | | | | | | | | | | A number of the shorter commands were not displayed in a code block, making them trickier to copy and paste into a console. Closes #2257. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/2257 PiperOrigin-RevId: 142262893 MOS_MIGRATED_REVID=142262893
* Pass through a "cpu:" tag to the execution info of genrules and tests.Gravatar Philipp Wollermann2016-12-16
| | | | | | | | This might be used to influence resource allocation for actions later. -- PiperOrigin-RevId: 142262023 MOS_MIGRATED_REVID=142262023
* Revert "Fix repositories to use 'BUILD.bazel' as the name for the ↵Gravatar John Cater2016-12-16
| | | | | | | | | | | | | symlinked/new build file, which has less changes of causing conflicts. Fixes #2226." This reverts commit 2f31d60d1454cd324196a5159262c1ba32eabda8. Re-open #2226. -- Change-Id: I7f223df4bb239daf8c306955e92f817310e6cd4f Reviewed-on: https://cr.bazel.build/7950 PiperOrigin-RevId: 142257579 MOS_MIGRATED_REVID=142257579
* Continued TestStrategy refactoring.Gravatar Ulf Adams2016-12-16
| | | | | | | | | More renaming and some reformatting to make StandaloneTestStrategy more closely resemble the internal implementation of TestStrategy. -- PiperOrigin-RevId: 142254302 MOS_MIGRATED_REVID=142254302
* Make StandaloneTestStrategy more closely resemble the internal one.Gravatar Ulf Adams2016-12-16
| | | | | | | | | This just changes the order of variable initialization, method names, and similar. It should not result in any semantic changes. -- PiperOrigin-RevId: 142251887 MOS_MIGRATED_REVID=142251887
* Fix wrong LibraryToLinkValue lib_group_presence computationGravatar Marcel Hlopko2016-12-16
| | | | | | -- PiperOrigin-RevId: 142250621 MOS_MIGRATED_REVID=142250621
* Add option to dynamically link in the compilation output of cc_test andGravatar Googler2016-12-16
| | | | | | | | | | | | | | | | | | | cc_binary if we are doing dynamic linking anyway. The additional option is only for a smooth rollout and will go away once everything works as expected. The benefit is in an incremental save-build-test-cycle. When editing a test (or any of it's transitive headers), the linker input currently changes, meaning we need to do the full link again before the test can run. However, in conjunction with the option --interface_shared_objects, this actually isn't necessary. With this new option, the test source gets compiled into a .so file and while that file changes with each source change, the .ifso file often does not change. Thus, the costly link linking to gether all the .so and .ifso files can be retrieved from cache. Thus, this change should remove this linking step from the critical path of many save-build-test-cycles. -- PiperOrigin-RevId: 142244352 MOS_MIGRATED_REVID=142244352
* Bazel client, Windows: implement pipe handlingGravatar Laszlo Csomor2016-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create WindowsPipe which implements IPipe, and is a Windows-native implementation of pipe handling. It wraps the ::CreatePipe, ::WriteFile, and ::ReadFile API functions. Start using WindowsPipe on MSYS. Also move everything from file_test.cc into file_posix_test.cc, because these test methods heavily depend on POSIX and they test file_posix's functionality anyway. Also add tests for pipes: this will use the platform-specific implementation of IPipe. file_test.cc is now platform-independent, and we can test it with --cpu=x64_windows_msvc (and it passes!). See https://github.com/bazelbuild/bazel/issues/2107 Might also fix: https://github.com/bazelbuild/bazel/issues/2182 https://github.com/bazelbuild/bazel/issues/2248 -- PiperOrigin-RevId: 142240377 MOS_MIGRATED_REVID=142240377
* Rollback of commit 2d87bf1937c81ef84358fd5f6a372875f6c6fabf.Gravatar Marcel Hlopko2016-12-16
| | | | | | | | | | | | | | | | | *** Reason for rollback *** We have to roll back unknown commit, on which this one depends. Will resubmit after I fix the underlying issue. *** Original change description *** Support versioned shared library targets for cc_binary linkshared=1 This change allows versioned shared libraries (e.g. "libfoo.so.1.2") to be built and linked. -- PiperOrigin-RevId: 142240145 MOS_MIGRATED_REVID=142240145
* Up the MD5-reading buffer size to 8192. This keeps us within a 16K stack ↵Gravatar Googler2016-12-16
| | | | | | | | size while halving the number of syscalls required to get an MD5 of a file. This shaves a few hundred milliseconds off of startup time. -- PiperOrigin-RevId: 142235555 MOS_MIGRATED_REVID=142235555
* Some improvements to ParallelQueryUtils.Gravatar Nathan Harmata2016-12-16
| | | | | | | | | | | | | | | | | | | | | | | | (i) Use a CountDownLatch in ParallelQueryUtils#executeQueryTasksAndWaitInterruptibly to avoid busy-looping while waiting for query subtask completion (this busy-looping unnecessarily ties up a thread). But we still retain the fail-fast semantics we want (I renamed the method to emphasize this). (ii) Also have a special-case in ParallelQueryUtils#executeQueryTasksAndWaitInterruptibly for evaluating one query subtask so we don't wastefully use another thread. (iii) Also add ThreadSafety annotations to ParallelQueryUtils. ---- (i) and (ii) combine to address the following theoretical issue. Suppose we're evaluating a query expression of the form "(e1 - e2) + (e3 - e4)". The old code would (with the worst-case FJP thread scheduling) have the following threads at the _same_ time: Main QueryCommand thread - executeQueryTasksAndWaitInterruptibly(queryTasks = [(e1 - e2), (e3 - e4)] FJP thread - executeQueryTasksAndWaitInterruptibly(queryTasks = [e2]) FJP thread - eval(e2) FJP thread - executeQueryTasksAndWaitInterruptibly(queryTasks = [e4]) FJP thread - eval(e4) So of those 5 concurrent threads, 3 would be doing busy-loop waiting. For more pathological query expressions, we could end up tying up lots of threads doing wasteful busy-loops. -- PiperOrigin-RevId: 142215680 MOS_MIGRATED_REVID=142215680
* Improve the error message for when bazel can't determine the java package ↵Gravatar Alex Humesky2016-12-16
| | | | | | | | for android resource processing. -- PiperOrigin-RevId: 142215076 MOS_MIGRATED_REVID=142215076
* RELNOTES[NEW]: Allow Android aidl tool to add a jar to the program's ↵Gravatar Googler2016-12-16
| | | | | | | | classpath, such as if needed to support generated sources. -- PiperOrigin-RevId: 142214383 MOS_MIGRATED_REVID=142214383
* Expose apple_generate_dsym value to Skylark and use in swift_libraryGravatar Dmitry Shevchenko2016-12-16
| | | | | | -- PiperOrigin-RevId: 142194378 MOS_MIGRATED_REVID=142194378
* Support versioned shared library targets for cc_binary linkshared=1Gravatar Googler2016-12-16
| | | | | | | | | This change allows versioned shared libraries (e.g. "libfoo.so.1.2") to be built and linked. -- PiperOrigin-RevId: 142193230 MOS_MIGRATED_REVID=142193230
* Move TestStrategy to lib.exec package.Gravatar Ulf Adams2016-12-15
| | | | | | | | | | | | | | | | This is part of refactoring test strategy to unify its implementation between Bazel and Blaze (Google's internal version of Bazel), which should fix several issues in Bazel. It's also necessary to untangle lib.rules and lib.exec to enforce proper layering by separating compilation of these packages, and to provide a minimal Bazel binary. In particular, no core part of Bazel should depend on any of the rules, to facilitate moving them out of Bazel / reimplementing them in Skylark (except for some core rules like test_suite, alias, and genquery). -- PiperOrigin-RevId: 142151901 MOS_MIGRATED_REVID=142151901
* Streamline Fingerprint implementationGravatar Michajlo Matijkiw2016-12-15
| | | | | | | | | | | | Thread all updates through a CodedOutputStream. This has the benefit of potentially hashing less data, as many int values can be represented more compactly, and reducing the churn of hashing strings (generally), since CodedOutputStream is already heavily optimized for this. While the buffer size is a little generous, it winds up paying off. -- PiperOrigin-RevId: 142151062 MOS_MIGRATED_REVID=142151062
* Fix PathFragment to not use Java8-only static hashCode methods.Gravatar John Cater2016-12-15
| | | | | | | | Fixes #2247. -- PiperOrigin-RevId: 142143520 MOS_MIGRATED_REVID=142143520