aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/bootstrap/compile.sh
Commit message (Collapse)AuthorAge
* Add the --grpc_port startup option and start a Java server if it's passed in.Gravatar Lukacs Berki2016-04-14
| | | | | | | | | | | | | Note that the presence of server/grpc_port does not guarantee that the server actually listens to it and we can't guarantee it, either, because it can always be kill -9'd. I haven't decided yet how the transition between AF_UNIX and gRPC will work. For now, I'm happy that we can start up a Java server. The way to get the kernel-chosen port is truly awful, but it is apparently impossible to do so in a different way: https://github.com/grpc/grpc-java/issues/72 -- MOS_MIGRATED_REVID=119828354
* Rollback of commit 6cb8d820689ad029a9d0dc4ee1100db9b2d96515.Gravatar Damien Martin-Guillerez2016-04-14
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks ci.bazel.io While the basics for fixing the build is easy (just a few typos in packages building), fixing the test is a bit more tricky. I see only one solution for fixing the test: use a select statement that would select the good bazel version but that would always pull JavaBuilder as an external dependency when we do test. Better roll this back then check the JavaBuilder 0.1.0 as a binary in third_party before rolling forward (a similar change is still needed to decouple running the test and building the binary for JDK 7) *** Original change description *** Refactor build for JDK 7 Now the JDK 7 tuning happens all in Bazel, removing logic from the CI script. It uses remote repositories to access JDK 7 dependencies. -- MOS_MIGRATED_REVID=119773123
* Fixes bugs so that we can build bazel with bazel on WindowsGravatar Yun Peng2016-04-14
| | | | | | | | | | | | | | | | | | | src/main/java/com/google/devtools/build/lib/exec/SymlinkTreeHelper.java: enable --windows_compatible flag on Windows to make build-runfiles.exe work. scritps/bootstrap/compile.sh: --windows_compatible will also be passed to a dummy build-runfiles.exe defined in complie.sh. Which is actully a batch script, modify it to make it work. ----- With the changes above, we are able to build bazel with bazel. But when you try to run ./compile.sh compile /path/to/bazel again without clean up tmp directory, it will fail with a permission deny error. The reason seems to be that you can't use build-runfile.exe to build the same hard link twice, still trying to solve that. -- Change-Id: I93340b1ba9fa415f6db963b106e264799e33ede3 Reviewed-on: https://bazel-review.googlesource.com/#/c/3334 MOS_MIGRATED_REVID=119751076
* Refactor build for JDK 7Gravatar Damien Martin-Guillerez2016-04-13
| | | | | | | | | | | Now the JDK 7 tuning happens all in Bazel, removing logic from the CI script. It uses remote repositories to access JDK 7 dependencies. -- Change-Id: Iff590c6642ca5b2343aa15096f8fd837d1c80787 Reviewed-on: https://bazel-review.googlesource.com/#/c/3327 MOS_MIGRATED_REVID=119634530
* Add stub gRPC C++ client and Java server.Gravatar Lukacs Berki2016-04-12
| | | | | | | The code doesn't do anything yet and it's unused code for now. This change only serves to add all the necessary dependencies to BUILD files that gRPC needs. -- MOS_MIGRATED_REVID=119628697
* Remove magic terminal width 97Gravatar Klaus Aehlig2016-03-17
| | | | | | | | | | | | | | | | | Bazel expects to be told the width of the terminal; during bootstrap, we do not have a good mechanism of determining it, so we have to resort to a hard-coded value. However, 97 is a not very well motivated value (and actually not a very useful value either) which is hard to guess that this is a default value. Resorting to Bazel's built-in default of 80 is only slightly more useful, but, at least, it is easily recognizable as a default value, as 80 is the width of the famous VT100, the standard punch card, etc. -- Change-Id: I62403ca37ee74a090067a5a4248028e3d624b7c6 Reviewed-on: https://bazel-review.googlesource.com/#/c/3082 MOS_MIGRATED_REVID=117346018
* Make bootstrap process wrapper honor '-' as stdout/stderrGravatar Klaus Aehlig2016-03-17
| | | | | | | | | | | | | | For the process wrapper the value '-' has a special meaning as file name to which stdout/stderr are to be redirected: do not redirect. However, the simple shell script that serves as process wrapper during the bootstrap phase was not aware of this special meaning, resulting in loss of useful process output, which is especially annoying during bootstrap. Fix this. -- Change-Id: Ifcf84e9000d74dafc69b675f192c1fc1cce484e8 Reviewed-on: https://bazel-review.googlesource.com/#/c/3081 MOS_MIGRATED_REVID=117338558
* Use bind to redirect C++ crosstool configurationGravatar Damien Martin-Guillerez2016-03-02
| | | | | | | | This is a temporary workaround to enable the use of a cc_configure() rules to auto-configure C++ toolchain. -- MOS_MIGRATED_REVID=116140726
* Allow outputting the progress of Bazel's build.Gravatar Julio Merino2016-02-26
| | | | | | | | | | | | Rename run_silent to run and add a global VERBOSE variable that tunes whether the run function prints its output or not. This is for better debugging possibilities of Bazel's self-build, though compile.sh remains silent as before and only displays the command's output in case of an error. -- MOS_MIGRATED_REVID=115599355
* On Windows, build ``bazel.exe`` instead of just ``bazel``.Gravatar Dmitry Lomov2016-02-16
| | | | | | | Needed for #276. -- MOS_MIGRATED_REVID=114693711
* Add --ignore_unsupported_sandboxing to the bootstrap buildGravatar Damien Martin-Guillerez2016-02-09
| | | | | | | | The recent change in the bootstrap process was causing a warning about sandboxing not being activated. -- MOS_MIGRATED_REVID=114106185
* Handle JAVA_HOME with spacesGravatar Dmitry Lomov2016-01-29
| | | | | -- MOS_MIGRATED_REVID=113356411
* Fix Bazel bootstrapping with JDK 7Gravatar Damien Martin-Guillerez2016-01-18
| | | | | | | | | | | With latest change to the bootstrap compilation, some options were wrongly moved around. Tested with `source scripts/ci/build.sh; bazel_build` for JAVA_VERSION 1.7 and 1.8. -- MOS_MIGRATED_REVID=112409496
* Use only the Bazel server for bootstrappingGravatar Damien Martin-Guillerez2016-01-18
| | | | | | | This remove all C++ compilation in bootstrapping itself. -- MOS_MIGRATED_REVID=112407516
* Use JavaIoFileSystem during the bootstrapping, removing JNI compilation.Gravatar Damien Martin-Guillerez2016-01-18
| | | | | | | Another step towards no C++ compilation outside of Bazel for bootstrapping. -- MOS_MIGRATED_REVID=112399835
* Replaced process-wrapper by a dummy version for bootstrappingGravatar Damien Martin-Guillerez2016-01-18
| | | | | | | | process-wrapper is a C++ tool, replacing by a dummy shell version to reduce the number of C++ compiler calls during the bootstrap process. -- MOS_MIGRATED_REVID=112398152
* Use a dummy build-runfiles in the bootstrap binaryGravatar Damien Martin-Guillerez2016-01-18
| | | | | -- MOS_MIGRATED_REVID=112397181
* Do not use sandboxing when bootstrappingGravatar Damien Martin-Guillerez2016-01-18
| | | | | | | | This simplify the bootstrap process and remove a C++ tool from the bootstrap binary. -- MOS_MIGRATED_REVID=112394555
* Do not include bazel_tools in the bootstrap binaryGravatar Damien Martin-Guillerez2016-01-15
| | | | | | | | | Instead use the current tools from the repository. This simplifies the bootstrap binary and is a step towards no C++ compilation for the bootstrap binary. -- MOS_MIGRATED_REVID=112240524
* Add xcode_locator to bazel's embedded binaries.Gravatar Chris Parsons2016-01-08
| | | | | | | For bazel on non-darwin architectures, this will simply be a stub, and should never be invoked. On darwin arcitectures, the tool will map xcode version to xcode path on the host system. -- MOS_MIGRATED_REVID=111651147
* Add the ability to customize the bazel client's exit code used when the ↵Gravatar Nathan Harmata2016-01-08
| | | | | | | bazel server exits abruptly. -- MOS_MIGRATED_REVID=111641619
* Fix build on FreeBSD.Gravatar Googler2015-11-17
| | | | | -- MOS_MIGRATED_REVID=108029812
* Remove unused jquery/d3 references.Gravatar Han-Wen Nienhuys2015-11-10
| | | | | -- MOS_MIGRATED_REVID=107377319
* compile.sh to take LDFLAGS for bootstrapGravatar Alpha Lam2015-10-27
| | | | | | | | | | | | | | | | | | | | | During bootstrap a number of tools are linked manually. These link steps should take LDFLAGS to bootstrap bazel with custom toolchain. These tools are build-runfiles, process-wrapper and namespace-sandbox. cc_link() routine in compile.sh already takes LDFLAGS but not the link steps for the tools listed above. They should all do so. A developer can now do this to build Bazel: CC="some-gcc" CXX="some-g++" LDFLAGS="-Lsome-glibc" \ JNI_LD_ARGS="-Lsome-glibc" ./compile.sh -- Change-Id: Ifd1a03e989266a7fe3f1f92a7a44093b135fdc18 Reviewed-on: https://bazel-review.googlesource.com/2211 MOS_MIGRATED_REVID=106378256
* Remove a meaningless comment that I submitted accidentally.Gravatar Lukacs Berki2015-10-27
| | | | | -- MOS_MIGRATED_REVID=106307162
* Read $HOME first to determine the home directory (and when not present, fall ↵Gravatar Lukacs Berki2015-10-27
| | | | | | | | | back to getpwuid()) Also a minor compatibility fix in a sed invocation. -- MOS_MIGRATED_REVID=106291639
* Introduce two new options to Linux sandbox wrapper:Gravatar Ming Zhao2015-10-08
| | | | | | | | | | | * -n: Create a new network namespace with only loopback interface. * -r: set the uid/gid inside the sandbox to be root (instead of nobody) so that setuid programs like ping can still run when needed. -- Change-Id: I8ab434e47e0f6933ee9de02e135c8daec39fe73f Reviewed-on: https://bazel-review.googlesource.com/#/c/2101/ MOS_MIGRATED_REVID=104858163
* Embed a tools directory into the Bazel binary.Gravatar Lukacs Berki2015-10-06
| | | | | | | This is currently unused deadweight, but will be used pretty soon to access the tools directory instead the menagerie of various odd mechanism we currently use. -- MOS_MIGRATED_REVID=104737151
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* Enforce UTF-8 encoding in bootstrappingGravatar Damien Martin-Guillerez2015-09-21
| | | | | | | This is breaking our CI system. Also removed the UTF-8 quotes. -- MOS_MIGRATED_REVID=103534994
* Port to FreeBSD.Gravatar Doug Rabson2015-08-26
| | | | | | | -- Change-Id: I4e65cc583e758d2f7e45209ffcb37f6a871e2ed7 Reviewed-on: https://bazel-review.git.corp.google.com/#/c/1840 MOS_MIGRATED_REVID=101462155
* Execute spawns inside sandboxes to improve hermeticity (spawns can no longer ↵Gravatar Philipp Wollermann2015-08-26
| | | | | | | | | | | | use non-declared inputs) and safety (spawns can no longer affect the host system, e.g. accidentally wipe your home directory). This implementation works on Linux only and uses Linux containers ("namespaces"). The strategy works with all actions that Bazel supports (C++ / Java compilation, genrules, test execution, Skylark-based rules, ...) and in tests, Bazel could successfully bootstrap itself and pass the whole test suite using sandboxed execution. This is not the default behavior yet, but can be activated explicitly by using: bazel build --genrule_strategy=sandboxed --spawn_strategy=sandboxed //my:stuff -- MOS_MIGRATED_REVID=101457297
* Add native support for linux on ARM Cpu (32 bits)Gravatar Zhong Wang2015-08-12
| | | | | | | -- Change-Id: Ia70ca1b8482e10bc1ac91799aa238f8613e5c824 Reviewed-on: https://bazel-review.googlesource.com/#/c/1801 MOS_MIGRATED_REVID=100476467
* Avoid command line argument mangling on Windows.Gravatar Dmitry Lomov2015-08-12
| | | | | | | | | | | | | | exec(3) under mingw converts every command line argument that looks like Unix path into Windows path when executing non-mingw images (criteria for non-mingw image is that the image does not depend on msys-<version>.dll). This affects bazel labels (`//foo:bar` becomes `/foo:bar` for example). This CL: 1) Replaces usage of execv(3) with Windows-native CreateProcess. 2) Converts all command line arguments that are indeed paths into Windows paths. -- MOS_MIGRATED_REVID=100386350
* Use blaze_util_mingw.cc for bootstrapping on Windows.Gravatar Dmitry Lomov2015-07-27
| | | | | -- MOS_MIGRATED_REVID=99015580
* Wrap zip step into run_silent in compile.shGravatar Damien Martin-Guillerez2015-07-23
| | | | | | | | | Ordering of message were confusing if the zip step was failing. Fixes #319 -- MOS_MIGRATED_REVID=98932569
* Set up protobuf compilers on Windows correctly for bootstrapping.Gravatar Googler2015-07-23
| | | | | -- MOS_MIGRATED_REVID=98815600
* Disable tests that requires JDK 8 when using compile.shGravatar Damien Martin-Guillerez2015-06-24
| | | | | | | Also fix the OS X travis build file. -- MOS_MIGRATED_REVID=96683399
* Get jdk.WORKSPACE into the default WORKSPACE file by reading it as a Java ↵Gravatar Lukacs Berki2015-06-15
| | | | | | | | | | | resource, then passing it to the parser as a string instead of putting it into embedded_binaries then passing a Path to it to the parser. This makes the upcoming default WORKSPACE rules for Android much more palatable. In particular, Android rules won't need to be special cased when building the Bazel binary because the contents are self-contained in BazelRuleClassProvider (and the jdk.WORKSPACE file, which is a simple Java resource) Even better would be not to use a string, but some kind of structured data, but that's probably more effort than it's worth. -- MOS_MIGRATED_REVID=95983199
* Improve platform and CPU detection, use the correct protoc binary for the ↵Gravatar Philipp Wollermann2015-06-12
| | | | | | | | | running system. Tested on OS X 10.10, Debian 8.1 (x86_64) and Debian 8.1 (i686). -- MOS_MIGRATED_REVID=95819163
* Fix permissions for zip filesGravatar Kristina Chodorow2015-06-12
| | | | | | | | | | | | | | | Now [new_]http_archive can be used for executables as well as "default permission" (644) files. This also gets rid of the Apache Commons Compress dependency entirely, which is nice. Fixing this also exposed some bugs in how archives were being decompressed (the same archive was being decompressed multiple times), which I also fixed by making the decompressors SkyFunctions. Fixes #238. -- MOS_MIGRATED_REVID=95747810
* Remove tools/jdk/jdk symbolic link creationGravatar Damien Martin-Guillerez2015-06-11
| | | | | | | | | | Skylark rules now depends completely on the external repository to access the JDK tooling. -- Change-Id: I48d461524d63d556bcd4af49f6ba2aecf1ed7068 Reviewed-on: https://bazel-review.googlesource.com/#/c/1500/ MOS_MIGRATED_REVID=95720688
* Fix order of redirection in compile.shGravatar Damien Martin-Guillerez2015-06-11
| | | | | | | | | | | This avoid having garbage warning when compiling Java code because we use the internal API of Javac. Also add a run_silent around the protobuf compilation. Fixes #239 -- MOS_MIGRATED_REVID=95707763
* Update Bazel's protobuf from 2.5.0 to 3.0.0-alpha3 for proto3 support.Gravatar Philipp Wollermann2015-06-10
| | | | | -- MOS_MIGRATED_REVID=95639138
* Reorganized compile.shGravatar Damien Martin-Guillerez2015-06-10
Now the blessed Bazel binary is self-hosted and correctly labeled. All tools are also built using Bazel and labeled with the release. At the end of the compilation, the output folder only host the Bazel binary now. We use temporary folders to store the intermediate artifacts. Also integrated ./bootstrap_test.sh in compile.sh so there is only one script for everything regarding bootstraping Bazel. -- Change-Id: Idadbd075e7b8ecb6e306b919b7a73c647c5cfbae Reviewed-on: https://bazel-review.googlesource.com/#/c/1460/ MOS_MIGRATED_REVID=95625880