aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/bootstrap
Commit message (Collapse)AuthorAge
* Bazel bootstrapping: make it work on Windows againGravatar Laszlo Csomor2017-01-31
| | | | | | | | | | | | | | | | | | | | | In this change: (1) add a sanity check to verify that GNU bintools are on the PATH (2) correct the PATH on Windows if (1) failed (3) use "<user>/My Documents/Temp" as the default temp directory instead of "%windir%/Temp", because the latter is non-writable Motivated by: https://github.com/bazelbuild/bazel/issues/2431 https://github.com/bazelbuild/bazel/issues/2449 -- PiperOrigin-RevId: 146006796 MOS_MIGRATED_REVID=146006796
* Set JAVA_HOME for every invocation of compile.sh . Gravatar Lukacs T. Berki2017-01-23
| | | | | | | | | | | | This is necessary since it's now passed in --javabase= even if no bootstrap build is requested. Fixes #2384. -- Change-Id: Icc15d9ec174ce9ed82b703c13449d88ec1d936a1 Reviewed-on: https://cr.bazel.build/8408 PiperOrigin-RevId: 145268264 MOS_MIGRATED_REVID=145268264
* Fix bootstrapping in Docker images.Gravatar Lukacs Berki2017-01-20
| | | | | | | | | | | | | | | | | | Turns out, we couldn't run jarjar because the Java launcher script looks for the .jars in the runfiles and build-runfiles is stubbed out during bootstrapping. The only reason why this worked at all is that sandboxing *also* doesn't work during bootstrapping but it causes the creation of symlinks that happened to be just in the right place for the Java launcher to find the .jars . The fix is: - Explicitly disable sandboxing during bootstrapping so that coincidences like this don't happen again - Pass a --javabase and --host_javabase option during the bootstrap build so that we don't need any symlinks to access to JVM - Invoke jarjar using its deploy jar instead of the launcher script. That was fun. -- PiperOrigin-RevId: 145083357 MOS_MIGRATED_REVID=145083357
* Fix regex condition in the bootstrap script.Gravatar Damien Martin-Guillerez2017-01-20
| | | | | | | | Bootstrap is broken at HEAD but that was hidden by another change. -- PiperOrigin-RevId: 145075041 MOS_MIGRATED_REVID=145075041
* Use regex to match error prone and guava jarGravatar Damien Martin-Guillerez2017-01-20
| | | | | | | | Hard-coding the version is causing difficulties to update error prone, so let's not do it. -- PiperOrigin-RevId: 145061484 MOS_MIGRATED_REVID=145061484
* Disable turbine for bootstrap buildsGravatar Liam Miller-Cushon2017-01-12
| | | | | | -- PiperOrigin-RevId: 144296949 MOS_MIGRATED_REVID=144296949
* Power supportGravatar Nishidha Panpaliya2016-12-21
| | | | | | | | | Closes #2139. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/2139 PiperOrigin-RevId: 142570236 MOS_MIGRATED_REVID=142570236
* 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
* Windows: fix bootstrappingGravatar Laszlo Csomor2016-12-19
| | | | | | | | | | Use $PATHSEP to create a Java classpath. Fixes https://github.com/bazelbuild/bazel/issues/2262 -- PiperOrigin-RevId: 142445784 MOS_MIGRATED_REVID=142445784
* Update to javac9-r3297Gravatar Liam Miller-Cushon2016-12-08
| | | | | | -- PiperOrigin-RevId: 141396618 MOS_MIGRATED_REVID=141396618
* Add quotes around variables when running dirnameGravatar Andrew Johnson2016-12-06
| | | | | | | | | | | | | | If a user happens to have spaces in the path name, `scripts/bootstrap/buildenv.sh` will fail with the error `usage: dirname path`. Quoting the argument to `dirname` when setting `WORKSPACE_DIR` avoids this issue. Closes #2030. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/2030 PiperOrigin-RevId: 141067912 MOS_MIGRATED_REVID=141067912
* Improve compile.sh error message furtherGravatar Klaus Aehlig2016-12-02
| | | | | | | | | | | | | In the error message about not being able to ./compile.sh from a plain checkout, add full instructions on how to build bazel. This will hopefully reduce the need for questions about this error message. -- Change-Id: I79c280c4c8522cf6f38ec731947365178aef9d58 Reviewed-on: https://cr.bazel.build/7594 PiperOrigin-RevId: 140846434 MOS_MIGRATED_REVID=140846434
* Improve ./compile.sh error messageGravatar Klaus Aehlig2016-11-28
| | | | | | | | | | | | ...when neither run on a distribution artefact nor PROTOC is set. In this case, it might be that the user was trying to build a development version of bazel, which should be done with 'bazel build //src:bazel'. -- Change-Id: Ib76601f625b36515a94af7508dfd73a3a352710f Reviewed-on: https://cr.bazel.build/7536 MOS_MIGRATED_REVID=140350570
* Change the bootstrap script to swapGravatar Nathan Harmata2016-11-23
| | | | | | | | | | the order of the error_prone_core jar and the guava jar. The default alphabetical-directory ordering is bad for the same reason that care is needed in the order of those jars in the rules in third_party/BUILD (see the comments there for more info). -- MOS_MIGRATED_REVID=140051569
* Make compile.sh use pregenerated protoc output, if presentGravatar Klaus Aehlig2016-11-23
| | | | | | | | | | | | Change ./compile.sh to look for pregenerated protoc output and use it, if present. If not, insist on PROTOC and GRPC_JAVA_PLUGIN to be specified via the environment. In this way compile.sh does not depend on committed binaries any more. -- Change-Id: I0d19a16535b606d2a6ab26ca349a7f9db8e224b7 Reviewed-on: https://bazel-review.googlesource.com/#/c/6731 MOS_MIGRATED_REVID=140037537
* When bootstrapping Bazel, use a proto-compiler from ↵Gravatar Carmi Grushko2016-11-11
| | | | | | | | | | | | | //third_party/protobuf/3.0.0/. The issue is that the proto-compiler in third_party/protobuf/ (not 3.0.0/) is actually 3.0.0-beta4, which lacks support for proto maps. This CL will be followed by the removal of the binaries in third_party/protobuf/. This is a temporary workaround to allow me to submit code that uses proto maps. -- MOS_MIGRATED_REVID=138815162
* Fix permissions before overwriting filesGravatar Klaus Aehlig2016-10-18
| | | | | | | | | | | | | | In our bazel-srcs tar ball, files are packed with permissions 550. Copying into a temporary directory may preserve permissions. So, when overwriting one of those files in the temporary directory, grant the user write permissions before writing to that file. Otherwise, bootstrapping from //:bazel-srcs via ./compile.sh as normal user will fail on some systems. -- Change-Id: I70b4645c9bc3c25b9fd356bacdb959205c64b931 Reviewed-on: https://bazel-review.googlesource.com/#/c/6695 MOS_MIGRATED_REVID=136360945
* Adding support for Linux s390xGravatar namrata-ibm2016-10-11
| | | | | | | | | | | We have added support for Linux s390x platform in Bazel. Closes #1891. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/1891 MOS_MIGRATED_REVID=135777047
* Add interfaces for the build event protocolGravatar Klaus Aehlig2016-09-28
| | | | | | | | | | | Bazel in the will provide a machine-readable stream of important build events. These interfaces set up the framework and expectations about the produced events and the entities distributing those events. -- Change-Id: If2c3b2e11c31b0136b57eadeef2d2f8f8fe5e2e7 Reviewed-on: https://bazel-review.googlesource.com/#/c/6272 MOS_MIGRATED_REVID=134522369
* Windows, bootstrapping: do not build JNI library.Gravatar Laszlo Csomor2016-09-28
| | | | | | | | | | Since commit 94d905836c167a21d2321d26c646fde07f5fc522 we no longer need JNI for WindowsFileSystem.isJunction. This is a partial rollback of commit 4a249b6962d32ed4cfd4165dfdae4a555b00bb69. Affects https://github.com/bazelbuild/bazel/issues/1680 -- MOS_MIGRATED_REVID=134506403
* Bootstrapping: don't use convenience symlinksGravatar Laszlo Csomor2016-09-27
| | | | | | | | | | | | | | | | | | | | | | When `compile.sh` builds bazel using bazel, it copies the resulting binary to `output/bazel`. However sometimes the convenience symlink `bazel-bin` is not created, probably because an old one is still around and cannot be deleted. That is clearly a bug, but to work around it, the bootstrap builder shouldn't attempt to rely on the creation of these symlinks in the first place. This change updates compile.sh to use `bazel info` to locate the `bazel-bin` directory's real path, and attempt to copy the bazel binary from there. This works around https://github.com/bazelbuild/bazel/issues/1827 -- MOS_MIGRATED_REVID=134398451
* Bazel bootstrapping: build an optimized binaryGravatar Laszlo Csomor2016-09-26
| | | | | | | | | Pass "-c opt" when building bazel. Fixes https://github.com/bazelbuild/bazel/issues/1830 -- MOS_MIGRATED_REVID=134307054
* Bazel bootstrapping: consume custom startup flagsGravatar Laszlo Csomor2016-09-26
| | | | | | | | | | | | | | | | | | | | | The bootstrap build is special in that it does not use the Bazel client hence we cannot pass a --bazelrc flag as there'd be nothing to parse it. While Bazel is being bootstrapped it's nice to have colors on a smart terminal, but when the bootstrapping is done by Jenkins as part of a CI test, we need the output to be readable, i.e. be free of control characters, so we should pass --colors=no for example. By exporting BAZEL_BOOTSTRAP_STARTUP_OPTIONS the user can control what startup flags will the bootstrap build use, so we can pass these dumbing-down flags during CI builds. -- MOS_MIGRATED_REVID=134273969
* Windows bootstrapping: Fix compile.sh with setting $TMPDIR.Gravatar Laszlo Csomor2016-09-06
| | | | | | | | | | | | | It now always uses mixed path style (drive letter + forward slashes) and expands abbreviated paths (when c:\\looongpath\\foo is abbreviated to c:\\looong~1\foo). The result will always look like c:/looongpath/foo/. Fixes https://github.com/bazelbuild/bazel/issues/1714 -- MOS_MIGRATED_REVID=132218638
* Rollback of commit a51ca6fa732af58a7d1667d408a2511ffa3199da.Gravatar Laszlo Csomor2016-09-06
| | | | | | | | | | | | | | | *** Reason for rollback *** Still broken. :( *** Original change description *** Windows bootstrapping: Fix compile.sh when $TMP is unset. Fixes https://github.com/bazelbuild/bazel/issues/1714 -- MOS_MIGRATED_REVID=132217266
* Windows bootstrapping: Fix compile.sh when $TMP is unset.Gravatar Laszlo Csomor2016-09-06
| | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/1714 -- MOS_MIGRATED_REVID=132060993
* Windows, JNI: use native isJunction method.Gravatar Laszlo Csomor2016-09-06
| | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/1680 -- MOS_MIGRATED_REVID=132051176
* xcode_configure repository rule for determining locally installed versions ↵Gravatar Chris Parsons2016-09-01
| | | | | | | | | | | of xcode to select between, relaxing the requirement that users specify --xcode_version and --ios_sdk_version even if they have only one version installed. RELNOTES: On mac devices, detect locally installed versions of xcode to: 1. Use a sensible default if xcode is required but --xcode_version is unspecified. 2. Use sensible default iOS SDK version for the targeted version of xcode if ios_sdk_version is unspecified. -- MOS_MIGRATED_REVID=131841587
* Update the JAVAC_VERSION regex to handle the case where javac adds extra ↵Gravatar John Cater2016-08-23
| | | | | | | | | text around the version string. Fixes #1678. -- Change-Id: I765699c43119e28d5f0ef8245b91e263d6af6dc0 Reviewed-on: https://bazel-review.googlesource.com/c/5570 MOS_MIGRATED_REVID=131080854
* Let Bazel use sandboxing during bootstrap, if it's available.Gravatar Philipp Wollermann2016-08-17
| | | | | -- MOS_MIGRATED_REVID=130406085
* Rollback of commit 7a1d4132012c5ae6c1617045138e1a662e3964bd.Gravatar Klaus Aehlig2016-08-05
| | | | | | | | | | | | | | | | | *** Reason for rollback *** The underlying issue (wrong operator '==' instead of '=' for test (a.k.a '[')) was fixed by commit 31b059fc07831f86be951609128b7cd51613df98 which removed the offending code completely. *** Original change description *** Revert build-runfiles to use /bin/bash If /bin/sh is dash (default on Ubuntu), this output a lot of garbage error, which make thing that the dummy build-runfiles is incorrect. See http://ci.bazel.io/view/Bazel%20bootstrap%20and%20maintenance/job/Bazel/JAVA_VERSION=1.8,PLATFORM_NAME=ubuntu_15.10-x86_64/731/console -- MOS_MIGRATED_REVID=129432905
* Revert build-runfiles to use /bin/bashGravatar Damien Martin-Guillerez2016-08-05
| | | | | | | | | If /bin/sh is dash (default on Ubuntu), this output a lot of garbage error, which make thing that the dummy build-runfiles is incorrect. See http://ci.bazel.io/view/Bazel%20bootstrap%20and%20maintenance/job/Bazel/JAVA_VERSION=1.8,PLATFORM_NAME=ubuntu_15.10-x86_64/731/console -- MOS_MIGRATED_REVID=129430198
* Make compile.sh print the console output for any failing commands during ↵Gravatar Lukacs Berki2016-08-04
| | | | | | | | | bootstrap. Previously, we deleted the temp dir and after that, we tried to print errfile in it, and were surprised that it didn't exist. -- MOS_MIGRATED_REVID=129320375
* Short-circuit runfiles tree creation if runfiles are disabled (for example, ↵Gravatar Lukacs Berki2016-08-04
| | | | | | | on Windows by default) -- MOS_MIGRATED_REVID=129319018
* Fix an embarrassing bug in the stub build-runfiles script used during ↵Gravatar Lukacs Berki2016-08-04
| | | | | | | | | bootstrapping. It apparently happened not to make a difference, but still. -- MOS_MIGRATED_REVID=129314926
* Bump grpc-java lib to version 0.15.0 non-binariesGravatar dapengzhang02016-07-25
| | | | | | | -- Change-Id: I2da9049019b3965975fab9b7f606d099d6eab2ff Reviewed-on: https://bazel-review.googlesource.com/#/c/4040/ MOS_MIGRATED_REVID=128208129
* Export xcode_locator's source file under tools/osx/ to make it available for ↵Gravatar Chris Parsons2016-07-21
| | | | | | | reference by future repository rules. Removes the xcode-locator binary file under tools/objc. Originally, the precompiled binary was going to be referenced, but it's easier to build from source in the repository rule. -- MOS_MIGRATED_REVID=128063694
* When running Javac and related tools, use -XX:+TieredCompilation ↵Gravatar Philipp Wollermann2016-07-18
| | | | | | | | | -XX:TieredStopAtLevel=1 instead of -client, as the latter is ignored on 64-bit JVMs since at least JDK 6. The new flags have been shown to cut down CPU time by 50% due to reduced time spent in JIT and improving overall run time for short running actions, some times also cutting them in half. -- MOS_MIGRATED_REVID=127536578
* Bootstrap Bazel with debug symbols.Gravatar Philipp Wollermann2016-07-15
| | | | | | | This helps a lot when trying to debug Bazel from an IDE. -- MOS_MIGRATED_REVID=127529499
* support sh besides bashGravatar Yue Gan2016-07-13
| | | | | -- MOS_MIGRATED_REVID=127198779
* Make bootstrapping support a designated work dirGravatar Klaus Aehlig2016-07-11
| | | | | | | | | | | | | Change the bootstrapping process so that setting the BAZEL_WRKDIR environment variable will tell the bootstrap process to mostly write to that directory---apart from adding the symlinks next to the WORKSPACE file. So setting this variable will avoid the usual writes to random places in the file system (like /tmp and the user's home directory). -- Change-Id: I9d1af747e75cc2a7bb1af08308acc9dfd927e920 Reviewed-on: https://bazel-review.googlesource.com/#/c/3963 MOS_MIGRATED_REVID=127075535
* Rollback of commit 1e37a5375f918376c132fa537e25695f673f41b8.Gravatar Dmitry Lomov2016-07-07
| | | | | | | | | | | | | *** Reason for rollback *** Apparently we now try to open output files for the process twice: once when we are constructing the output streams, and the second time when we tell the process to redirect its outputs. This causes the outputs to be empty on Windows *** Original change description *** Do redirection of stdout / stderr in Java instead of reimplementing it in every process wrapper again. -- MOS_MIGRATED_REVID=126801016
* Update the Java gPRC libraries to 0.14.1 .Gravatar Lukacs T. Berki2016-07-06
| | | | | | This makes the regeneration instruction in much simpler (since now they do publish 64-bit Linux binaries), and more importantly, fixes a race condition between a client request and the gRPC server timeout thread. Change-Id: I9c8b628530fa0192804f8e67b285963ac26110c4
* buildenv.sh: clean up each tmpdir onceGravatar Klaus Aehlig2016-07-04
| | | | | | | | | | | | | | | | | | | ...instead of cleaning up the last one once for each tmpdir. Commit 63e8d6321 changed the command registered atexit from an explict "rm -rf '${DIR}'" to a call to a cleanup_tempdir function, with the function containing the remove command. As, however, the function name is not unique (in fact, it is a constant), that function will get overridden at each invocation of the tempdir function. The fact that the function is registered several times with atexit doesn't help, as it will always remove the last created temporary directory. Fix this, by creating function names that encode the directory to be removed in the name. Fixes #1466. -- Change-Id: I833aef8ee5423412f058e74c8c9e2f4bb53a0cba Reviewed-on: https://bazel-review.googlesource.com/#/c/3955 MOS_MIGRATED_REVID=126406196
* Remove superfluous libdd_plist.jarGravatar Damien Martin-Guillerez2016-07-01
| | | | | | | | | We have the source so build from sources instead. This was causing strange behavior were the input file was conflicting with the output file of the corresponding java_library but was matched by the glob. Change-Id: Ie0b70215d1862627747bd7b83f075743c904c967
* Rename the property io.bazel.UnixFileSystem to io.bazel.EnableJni because ↵Gravatar Lukacs Berki2016-07-01
| | | | | | | | | that's what it does. In particular, it affects Windows. -- MOS_MIGRATED_REVID=126293339
* Do redirection of stdout / stderr in Java instead of reimplementing it in ↵Gravatar Philipp Wollermann2016-06-30
| | | | | | | every process wrapper again. -- MOS_MIGRATED_REVID=126279021
* Do not require users to set TMPDIR for bootstrap on Windows.Gravatar Dmitry Lomov2016-06-24
| | | | | | | | | Fixes 1444. -- Change-Id: If9afa2bebcd35b0c0882685588d8e1f3b18f5344 Reviewed-on: https://bazel-review.googlesource.com/#/c/3890/ MOS_MIGRATED_REVID=125771832
* Fix quoting in arguments to [Gravatar Klaus Aehlig2016-06-23
| | | | | | | | | | | | | When comparing two strings with test(1) we need to make sure that the strings are passed each as precisely one argument to test (a.k.a. [). Shell variables, like $1, however may expand to zero or more arguments; hence quote appropriately. -- Change-Id: I7fd1cee970ed24e6c332b0da361bc916aafcb006 Reviewed-on: https://bazel-review.googlesource.com/#/c/3881 MOS_MIGRATED_REVID=125671405
* Description redacted.Gravatar Carmi Grushko2016-06-23
| | | | | -- MOS_MIGRATED_REVID=125589653