Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
YouCompleteMe: better out(_android|_linux)? dir detection
ninja_output.py currently relies solely on the GYP_GENERATOR_FLAGS environment variable to detect custom out directories, but this variable is rarely set when this script is invoked from YouCompleteMe. For completeness, support is added for the CHROMIUM_OUT_DIR environment variable (it overrides GYP_GENERATOR_FLAGS). But the main purpose of the patch is to handle the case where neither environment variable is set, and in this case automatically choose between out, out_android and out_linux (or any other out_* directories), by returning the most recently used one. To calculate which is most recently used, instead of only looking at the modification time of 'build.ninja' and 'protoc' (neither of which seem to be updated during an incremental build), the maximum mtime amongst each directory and its top-level files is used, which should be more reliable. Review URL: https://codereview.chromium.org/863593002 Cr-Commit-Position: refs/heads/master@{#312838}
- Loading branch information