aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/cpp/blaze_util.cc
Commit message (Collapse)AuthorAge
* 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
* Fix compile warningsGravatar Kristina Chodorow2015-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | | This was printing: src/main/cpp/blaze_util.cc: In function 'bool blaze::WriteFile(const string&, const string&)': src/main/cpp/blaze_util.cc:211:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] return r == content.size(); ^ src/main/cpp/blaze_util.cc: In function 'bool blaze::CheckJavaVersionIsAtLeast(const string&, const string&)': src/main/cpp/blaze_util.cc:334:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < jvm_version_vect.size() && i < version_spec_vect.size(); ^ src/main/cpp/blaze_util.cc:334:73: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < jvm_version_vect.size() && i < version_spec_vect.size(); ^ src/main/cpp/blaze_util.cc:344:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (i < version_spec_vect.size()) { ^ src/main/cpp/blaze_util.cc:345:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (; i < version_spec_vect.size(); i++) { This also fixes that we weren't checking write()'s return code. -- MOS_MIGRATED_REVID=102656105
* 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
* 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
* Fix some C++ compiler warnings to comply with -Wall.Gravatar Ulf Adams2015-07-27
| | | | | | | | | Some progress towards #311. -- Change-Id: I9276519d4a97d358b7c4f4e34a861522d75dd495 Reviewed-on: https://bazel-review.googlesource.com/#/c/1710 MOS_MIGRATED_REVID=99019961
* launcher: observe umask in MakeDirectories.Gravatar Han-Wen Nienhuys2015-06-01
| | | | | -- MOS_MIGRATED_REVID=94905648
* Remove unused helper functions.Gravatar Han-Wen Nienhuys2015-05-27
| | | | | -- MOS_MIGRATED_REVID=94577279
* 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
* 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
* 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
* 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
* 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
* Fix TODO in recursive directory creationGravatar Kristina Chodorow2015-04-08
| | | | | -- MOS_MIGRATED_REVID=90517845
* Read the whole file descriptor instead of reading part of it for java ↵Gravatar Damien Martin-Guillerez2015-02-10
| | | | | | | | | -version parsing. The one-time read sometime fails when the JAVA_TOOL_OPTIONS is set making Bazel unable to detect JDK version. -- MOS_MIGRATED_REVID=85984806
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957