Skip to content

Commit

Permalink
This makes the Skia build work 95% in GN and it fixes a number of err…
Browse files Browse the repository at this point in the history
…or reporting bugs I found along the way.

BUG=
R=scottmg@chromium.org

Review URL: https://codereview.chromium.org/25360004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227057 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
brettw@chromium.org committed Oct 4, 2013
1 parent 5020e81 commit add138e
Show file tree
Hide file tree
Showing 7 changed files with 1,149 additions and 494 deletions.
1 change: 1 addition & 0 deletions tools/gn/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Config* Config::GetConfig(const Settings* settings,
if (!node) {
config = new Config(label);
node = new ItemNode(config);
node->set_originally_referenced_from_here(specified_from_here);
tree->AddNodeLocked(node);

// Only schedule loading the given target if somebody is depending on it
Expand Down
2 changes: 2 additions & 0 deletions tools/gn/functions_target.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ Value ExecuteGenericTarget(const char* target_type,

TargetGenerator::GenerateTarget(&block_scope, function->function(), args,
target_type, err);
if (err->has_error())
return Value();

block_scope.CheckForUnusedVars(err);
return Value();
Expand Down
11 changes: 9 additions & 2 deletions tools/gn/ninja_build_writer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,15 @@ std::string GetSelfInvocationCommand(const BuildSettings* build_settings) {

CommandLine cmdline(executable);
cmdline.AppendSwitchPath("--root", build_settings->root_path());

// TODO(brettw) append other parameters.
cmdline.AppendSwitch("-q"); // Don't write output.

const CommandLine& our_cmdline = *CommandLine::ForCurrentProcess();
const CommandLine::SwitchMap& switches = our_cmdline.GetSwitches();
for (CommandLine::SwitchMap::const_iterator i = switches.begin();
i != switches.end(); ++i) {
if (i->first != "q" && i->first != "root")
cmdline.AppendSwitchNative(i->first, i->second);
}

#if defined(OS_WIN)
return WideToUTF8(cmdline.GetCommandLineString());
Expand Down
4 changes: 0 additions & 4 deletions tools/gn/secondary/net/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -847,8 +847,6 @@ component("net") {
"socket/stream_socket.h",
"socket/tcp_client_socket.cc",
"socket/tcp_client_socket.h",
"socket/tcp_client_socket_win.cc",
"socket/tcp_client_socket_win.h",
"socket/tcp_listen_socket.cc",
"socket/tcp_listen_socket.h",
"socket/tcp_server_socket.cc",
Expand Down Expand Up @@ -1075,8 +1073,6 @@ component("net") {
if (is_win) {
sources -= [
"http/http_auth_handler_ntlm_portable.cc",
"socket/tcp_client_socket_libevent.cc",
"socket/tcp_client_socket_libevent.h",
"socket/tcp_socket_libevent.cc",
"socket/tcp_socket_libevent.h",
"ssl/client_cert_store_impl_nss.cc",
Expand Down
Loading

0 comments on commit add138e

Please sign in to comment.