Add a script to allow compiling a single source file. |
||
Issue description
Compiling a single source file is already doable with ninja but can be tricky, the basic command is:
ninja -C out/Debug ../../path/to/file^
it requires manipulating the path so it's relative to the build directory and the number of carets depend on your OS and on if you're using wrapper scripts to invoke ninja.
Having a small helper script to automatically compile a source file will be quite convenient and this could be used directly in a text editor (like Sublime) to compile the file you're currently editing.
This script would be invoked like this: compile_single_file --file-path {path_to_file} --build-dir {build_dir}
{path_to_file} and {build_dir} could either be absolute or relative to the current working directory.
,
Sep 6 2017
,
Mar 8 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0724732216bbc245eeff06787c9fb9698fe9270b commit 0724732216bbc245eeff06787c9fb9698fe9270b Author: Sebastien Marchand <sebmarchand@chromium.org> Date: Thu Mar 08 21:05:23 2018 Documents how to use compile_single_file in VSCode and Sublime. This scripts lives in depot_tools. Bug: 759146 Change-Id: I3877d3b53ef2f91b34cebb61b04e6f285a006ae7 Reviewed-on: https://chromium-review.googlesource.com/911428 Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org> Reviewed-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Sasha Morrissey <sashab@chromium.org> Cr-Commit-Position: refs/heads/master@{#541885} [modify] https://crrev.com/0724732216bbc245eeff06787c9fb9698fe9270b/docs/sublime_ide.md [modify] https://crrev.com/0724732216bbc245eeff06787c9fb9698fe9270b/docs/vscode.md |
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Sep 6 2017