diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-23 00:26:56 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-23 00:26:56 +0000 |
commit | ac1128e3801134c30a848eed0db7298826f8449b (patch) | |
tree | 947dcfceb075a78ed31561a61f57a40f5eb98566 /tools/gn/function_set_default_toolchain.cc | |
parent | eb9f0e842aaaa18355e5b2908f0da7f761c89dca (diff) | |
download | chromium_src-ac1128e3801134c30a848eed0db7298826f8449b.zip chromium_src-ac1128e3801134c30a848eed0db7298826f8449b.tar.gz chromium_src-ac1128e3801134c30a848eed0db7298826f8449b.tar.bz2 |
This make the GN current dir be set on thte scope. This fixes a bug where a template execution uses the directory of the file containing the template declaration. This makes it impossible to refer to the input files which are normally specified relative to the invoking file.
I added a defined() function that returns true if a variable has been defined. This needed some magic function invocation help because we don't actually want to evaluate the argument.
I added an optional second argument to assert for an error message.
We now tolerate absolute file paths for sources and outputs. Grit was outputtings these, which was confusiong some of our assertions. We'll now check if such locations are inside our source tree and fix them up accordingly.
I fixed a bug in the "desc" command where a target would be listed as a dependent of itself. I also added the target type to the output.
Note that I didn't implement MakeAbsolutePathRelativeIfPossible on Windows. I will do this on Windows in a second pass. Currently it's an #error.
There are several fixes to custom script target outputs and fixes to variables leftover from when I converted paths to start with two slashes.
BUG=
R=scottmg@chromium.org
Review URL: https://codereview.chromium.org/23396002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219161 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/gn/function_set_default_toolchain.cc')
-rw-r--r-- | tools/gn/function_set_default_toolchain.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/gn/function_set_default_toolchain.cc b/tools/gn/function_set_default_toolchain.cc index f6ece07..c2b20a5 100644 --- a/tools/gn/function_set_default_toolchain.cc +++ b/tools/gn/function_set_default_toolchain.cc @@ -56,7 +56,7 @@ Value RunSetDefaultToolchain(Scope* scope, if (!scope->IsProcessingDefaultBuildConfig()) return Value(); - const SourceDir& current_dir = SourceDirForFunctionCall(function); + const SourceDir& current_dir = scope->GetSourceDir(); const Label& default_toolchain = ToolchainLabelForScope(scope); if (!EnsureSingleStringArg(function, args, err)) |