aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/cpp
Commit message (Collapse)AuthorAge
...
* Cleanup: Initialize field members through ctor initializer list.Gravatar Thiago Farina2015-06-12
| | | | | | | | | | | | | This seems to be a win as it avoids re-initialing the fields that have a default constructor (non-POD), besides being the best and idiomatic practice. More details in http://stackoverflow.com/a/9903927 -- Change-Id: I6c184e8a53b385756938084ec60aebc8184243a0 Reviewed-on: https://bazel-review.googlesource.com/#/c/1513/3 MOS_MIGRATED_REVID=95815524
* Support --bazelrc= syntax to specify rcfileGravatar Damien Martin-Guillerez2015-06-05
| | | | | | | | | | We still support the --blazerc syntax and don't use the product name for legacy reasons. Bazel should only refer to --bazelrc now. Fixes #229 -- MOS_MIGRATED_REVID=95282659
* Cleanup: Mark single-parameter constructors as explicit.Gravatar Thiago Farina2015-06-05
| | | | | | | | | | This should fix the following cpplint.py warning: Single-parameter constructors should be marked explicit. [runtime/explicit] [5] -- Change-Id: I2bf74ced08f86bd5a4e6d57720188327bbd9efe6 Reviewed-on: https://bazel-review.googlesource.com/#/c/1452/ MOS_MIGRATED_REVID=95109413
* Pass user-specified JVM flags to AddJVMArguments so that JVM flags can be ↵Gravatar Janak Ramakrishnan2015-06-03
| | | | | | | customized based on user's flags. -- MOS_MIGRATED_REVID=95015135
* Use the ijar ZIP implementation in Blaze instead of libarchiveGravatar Damien Martin-Guillerez2015-06-01
| | | | | | | | | | | This ZIP implementation is lightweight and rely on zlib for compression. libarchive was a bit tricky to set-up so it's better to use that one. -- Change-Id: I607b492998572e834e095a4606eeb77c0b574542 Reviewed-on: https://bazel-review.googlesource.com/#/c/1410/ MOS_MIGRATED_REVID=94910072
* launcher: observe umask in MakeDirectories.Gravatar Han-Wen Nienhuys2015-06-01
| | | | | -- MOS_MIGRATED_REVID=94905648
* Cleanup: Remove unused Is64BitBlazeJavabase() function declaration.Gravatar Thiago Farina2015-06-01
| | | | | | | | | | This function has only a declaration, no implementation and thus no uses. Confirmed that it has no uses internally as well. -- Change-Id: Ifd9214b546f304077e4d729bf22abf6b49cc6af1 Reviewed-on: https://bazel-review.googlesource.com/1411 MOS_MIGRATED_REVID=94763256
* Remove unused helper functions.Gravatar Han-Wen Nienhuys2015-05-27
| | | | | -- MOS_MIGRATED_REVID=94577279
* Store RcFile pointers, rather than inline objects.Gravatar Han-Wen Nienhuys2015-05-22
| | | | | | | | | | | | | Since RcFile hands out pointers to its string members, modifying vector<RcFile> may cause reallocation, which invalidates handed out pointers. Fixes #205. -- Change-Id: Id4eb0a4e8a52373130140f1de5697f4e4f4a6f95 Reviewed-on: https://bazel-review.googlesource.com/#/c/1360/ MOS_MIGRATED_REVID=94276823
* Global cleanup change.Gravatar Googler2015-05-18
| | | | | -- MOS_MIGRATED_REVID=93882453
* Cleanup: Pass std::string arguments by reference (this avoids makingGravatar Thiago Farina2015-05-18
| | | | | | | | | | | | | unnecessary copies) and label them const, per the Google style guide. Tested: $ ./bootstrap_test.sh all -- Change-Id: I17636703cf43283f71b9b913c130a51065bd896b Reviewed-on: https://bazel-review.googlesource.com/1350 MOS_MIGRATED_REVID=93876332
* Cleanup: port.cc should include its header file port.hGravatar Thiago Farina2015-05-18
| | | | | | | | | | | | | port.cc implements sys_ioprio_set() function, but was not including the header that declares it. Also included port.h in blaze_util_linux.cc for iwyu, since that file is using sys_ioprio_set(). -- Change-Id: Ie6130df9ed72e8125d07f72455fc53a03afedbc1 Reviewed-on: https://bazel-review.googlesource.com/#/c/1321/ MOS_MIGRATED_REVID=93868707
* Remove hack for OSX javabaseGravatar Damien Martin-Guillerez2015-05-18
| | | | | | | Fixes #102 -- MOS_MIGRATED_REVID=93705078
* Remove race condition from directory creation in launcherGravatar Kristina Chodorow2015-05-15
| | | | | | | | | If someone ran two Bazel commands at the same time, the second mkdir call could fail because the first had already created the directory MakeDirectories was being called on. -- MOS_MIGRATED_REVID=93531813
* Build 'client' target with -Wno-sign-compare.Gravatar Thiago Farina2015-05-15
| | | | | | | | | | | | This way we don't get the following warning when building with -Wall: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] -- Change-Id: I259c2398c2d8df5b3444d2d2ed6d45d8c5cfceef Reviewed-on: https://bazel-review.googlesource.com/1291 MOS_MIGRATED_REVID=93514679
* Cleanup: Remove unused GetMountpoint() function.Gravatar Thiago Farina2015-05-15
| | | | | | | | | This was found by building 'client' target with -Wall. -- Change-Id: If14355813b83b9e29b36411eaf597de8d57bda6e Reviewed-on: https://bazel-review.googlesource.com/#/c/1290 MOS_MIGRATED_REVID=93415497
* Update include guards.Gravatar Han-Wen Nienhuys2015-05-15
| | | | | -- MOS_MIGRATED_REVID=93413161
* Remove declaration of **environ from blaze.cc.Gravatar Thiago Farina2015-05-08
| | | | | | | | | | | | The one we need is already in option_processor.cc. Tested on Linux with the following command line: $ ./bootstrap_test.sh all -- Change-Id: I5cdd781d0c2e20242773db1ccb7e9eccd2980a78 MOS_MIGRATED_REVID=93122461
* Fix the remaining 'seperated' typos.Gravatar Thiago Farina2015-05-08
| | | | | | | | | | | | | I forgot to look at the header file when doing https://github.com/google/bazel/commit/a0592a13c8801f395a17641579f16a3c3bc4587e. Now I ran the following command line to make sure I didn't miss any: $ git grep seperated -- Change-Id: Id834f87667135e91bd0c3024e0a99e52954a7038 MOS_MIGRATED_REVID=93120398
* Fix 'seperated' typo in ProcessArg() parameter.Gravatar Thiago Farina2015-05-07
| | | | | | | | s/seperated/separated. -- Change-Id: I303e4ff20b241c2c58fe00ad0a5e340b5bff54d9 MOS_MIGRATED_REVID=93025985
* Cleanup: Remove GetJvm() function declaration.Gravatar Thiago Farina2015-05-07
| | | | | | | | There is no implementation and thus nobody is calling/using it. -- Change-Id: I2cf184e3d80eb0ef2b04ea4617697e8426cc7a58 MOS_MIGRATED_REVID=93018104
* Remove comment about a limitation that does not exist anymore.Gravatar Thiago Farina2015-05-07
| | | | | | | | | Since we are now in C++11, this comment about C++03 and ARRAYSIZE() macro (which we don't even have) does not apply and thus we can just remove it. -- Change-Id: Id0c0c59eab5b90ff5f70d5078caa2c8e618d787a MOS_MIGRATED_REVID=93017596
* Cleanup: Use the standard types from stdint.h.Gravatar Thiago Farina2015-05-05
| | | | | | | | | Now that our toolchain supports stdint.h, we don't need to provide our custom types ourselves through numbers.h. -- Change-Id: I01de083e735e5cd64bcca723b19c55b9429632b7 MOS_MIGRATED_REVID=92840495
* Cleanup: Mark some functions as static.Gravatar Thiago Farina2015-04-28
| | | | | | | | | Like the other functions in this file, these do not need to be public. So lets mark them as static so they are consistent with the surrounding code. -- Change-Id: I8de8d1578c0f9bdfec0fee3f67b527de4e135a82 MOS_MIGRATED_REVID=92281179
* Cleanup: Do not include unnecessary headers in blaze_util.h.Gravatar Thiago Farina2015-04-28
| | | | | | | | | | | | The header only uses std::string, std::vector, int and char types, and thus all these headers do not need to be included there. If necessary, they should be included in the relevant source files instead. -- Change-Id: Id1849a0f427016dcf732fe6bfc673e599e8d4b14 MOS_MIGRATED_REVID=92192506
* Explain extra_options more clearly.Gravatar Han-Wen Nienhuys2015-04-27
| | | | | -- MOS_MIGRATED_REVID=92152092
* Move blaze_exit_code.h into util/ directory.Gravatar Thiago Farina2015-04-24
| | | | | | | | This is so util/ files do not depend on anything from higer level. -- Change-Id: I522be6722851f25e79d9c2b85275856cbbd978de MOS_MIGRATED_REVID=91882837
* Header cleanups.Gravatar Han-Wen Nienhuys2015-04-22
| | | | | -- MOS_MIGRATED_REVID=91681168
* Check that getenv() returns non-null in blaze::Which()Gravatar Damien Martin-Guillerez2015-04-14
| | | | | | | | getenv() returns value was not checked for non-null result and it led to exception raised at runtime on some corner case (see bug #113). -- MOS_MIGRATED_REVID=91071694
* Cleanup: Build file.cc as part of util library.Gravatar Thiago Farina2015-04-14
| | | | | | | | | | | | | | | | | | | | | | Looks like in the transition it was forgotten to be moved to the new location. As an effect of this change it was discovered that file.cc had an dependency back on blaze_util.cc (from client binary for die/pdie functions). In order to fix that dependency we have had to move die/pdie functions into util library (added errors.(cc|h)) for this. Tested on Linux with the following command lines: $ ./compile.sh $ ./output/bazel build //src/main/cpp:all $ ./output/bazel build //src:bazel $ ./bootstrap_test.sh all -- Change-Id: I70fb1b6189dc5af31f816332d76efe380ef26302 MOS_MIGRATED_REVID=90987514
* Use int64_t for the offset argument of libarchive function call.Gravatar Han-Wen Nienhuys2015-04-13
| | | | | | | | | off_t and int64_t are different on 32-bit platforms. Fixes #18. -- MOS_MIGRATED_REVID=90802730
* Fix the compilation of blaze_startup_options.cc on old Ubuntu systems.Gravatar Ulf Adams2015-04-10
| | | | | | | | | | | Ubuntu LTS has a gcc version that generates broken code for certain newer C++ constructs. Change the code to avoid those constructs. Fixes #68. -- Change-Id: 4a0420a6c996d0e7785e5cdf39bbd0602472449f MOS_MIGRATED_REVID=90739507
* Cleanup: Create hash buffer reusing Md5Digest's length constant.Gravatar Thiago Farina2015-04-09
| | | | | | -- Change-Id: I67fa2a289cf82a4aee6b724429c1a1719c5649b4 MOS_MIGRATED_REVID=90707308
* Add logging of blaze_cpu flag usage. Before we can remove this flag we need ↵Gravatar Marian Lobur2015-04-09
| | | | | | | to be sure that no one uses it. -- MOS_MIGRATED_REVID=90693216
* Cleanup: Change is IsSharedLibrary() to take a const-reference parameter.Gravatar Thiago Farina2015-04-08
| | | | | | | | This should avoid making unnecessary string copies. -- Change-Id: I655f348ddeb3df47264a899a10d36086d2c2b596 MOS_MIGRATED_REVID=90614260
* Remove reference to LinuxThreads, which should be thoroughly dead byGravatar Han-Wen Nienhuys2015-04-08
| | | | | | | now. -- MOS_MIGRATED_REVID=90610846
* Automated [] rollback of [].Gravatar Kristina Chodorow2015-04-08
| | | | | | | | | | | | | *** Reason for rollback *** This does not allow bazel help to be run from outside of a workspace *** Original change description *** Improve error message if WORKSPACE file is not found -- MOS_MIGRATED_REVID=90608117
* Fix TODO in recursive directory creationGravatar Kristina Chodorow2015-04-08
| | | | | -- MOS_MIGRATED_REVID=90517845
* Cleanup: Refactor the test of TEST_TMPDIR env variable.Gravatar Thiago Farina2015-04-08
| | | | | | | | | | No need to keep a separate variable at the top of the file, it is simpler to just check the return value of getenv() directly in the call site. -- Change-Id: I896836206ccbf20743ef9679b10cec0cb7406122 MOS_MIGRATED_REVID=90505777
* Cleanup: Remove unused SPAM variable.Gravatar Thiago Farina2015-04-03
| | | | | | | | | The same functionality is already provided by blaze_util::VerboseLogging() function. -- Change-Id: I6102ffd985354e666dc8440080de6c35146199cb MOS_MIGRATED_REVID=90155343
* Removes warning if disk is almost fullGravatar Googler2015-03-27
| | | | | | | Fixes #25 -- MOS_MIGRATED_REVID=89602166
* Use bazel in output user rootGravatar Kristina Chodorow2015-03-26
| | | | | | | Fixes https://github.com/google/bazel/issues/26. -- MOS_MIGRATED_REVID=89599829
* Enforce executable flags on embedded binariesGravatar Damien Martin-Guillerez2015-03-26
| | | | | | | | | | | | Depending on the setting of the machine, the executable flag might not be set. ZIP format does not conserve unix permissions and it is probably up to the umode set. Not relying on the system permission is more stable. Fixes #58 -- MOS_MIGRATED_REVID=89581859
* Adds some notes about --batch flag.Gravatar Googler2015-03-24
| | | | | -- MOS_MIGRATED_REVID=89348225
* Use getpwuid(getuid()) to determine the output root under LinuxGravatar Damien Martin-Guillerez2015-03-24
| | | | | | | | | | Also Fallback the default ouput root to /var/tmp if $HOME is not set under Linux. If $HOME environment variable was not set, Bazel would crash with a std::logic_error. Using getpwuid() make Bazel more resilient to wrong environment. -- MOS_MIGRATED_REVID=89292008
* Recursively create cache dirGravatar Kristina Chodorow2015-03-23
| | | | | -- MOS_MIGRATED_REVID=89162431
* Use a /var/tmp path for Bazel output tree on OSXGravatar Daniel Wagner-Hall2015-03-23
| | | | | | | | | The current value: 1) Isn't created by anything, and 2) Generates too long a path for the name of a Unix domain socket -- MOS_MIGRATED_REVID=89152182
* Use OS-specific caches for output rootGravatar Kristina Chodorow2015-03-23
| | | | | -- MOS_MIGRATED_REVID=89144546
* Use a variable for product name in launcher messagesGravatar Kristina Chodorow2015-03-18
| | | | | | | This fixes almost everything, there are still a couple of blazerc messages. -- MOS_MIGRATED_REVID=88846240
* Improve error message if WORKSPACE file is not foundGravatar Kristina Chodorow2015-03-18
| | | | | -- MOS_MIGRATED_REVID=88746523