Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: tools/gn/target_generator.cc

Issue 1386783003: [GN]: Support for loadable modules (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "tools/gn/target_generator.h" 5 #include "tools/gn/target_generator.h"
6 6
7 #include "tools/gn/action_target_generator.h" 7 #include "tools/gn/action_target_generator.h"
8 #include "tools/gn/binary_target_generator.h" 8 #include "tools/gn/binary_target_generator.h"
9 #include "tools/gn/build_settings.h" 9 #include "tools/gn/build_settings.h"
10 #include "tools/gn/config.h" 10 #include "tools/gn/config.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 ActionTargetGenerator generator(target.get(), scope, function_call, 93 ActionTargetGenerator generator(target.get(), scope, function_call,
94 Target::ACTION_FOREACH, err); 94 Target::ACTION_FOREACH, err);
95 generator.Run(); 95 generator.Run();
96 } else if (output_type == functions::kExecutable) { 96 } else if (output_type == functions::kExecutable) {
97 BinaryTargetGenerator generator(target.get(), scope, function_call, 97 BinaryTargetGenerator generator(target.get(), scope, function_call,
98 Target::EXECUTABLE, err); 98 Target::EXECUTABLE, err);
99 generator.Run(); 99 generator.Run();
100 } else if (output_type == functions::kGroup) { 100 } else if (output_type == functions::kGroup) {
101 GroupTargetGenerator generator(target.get(), scope, function_call, err); 101 GroupTargetGenerator generator(target.get(), scope, function_call, err);
102 generator.Run(); 102 generator.Run();
103 } else if (output_type == functions::kLoadableModule) {
104 BinaryTargetGenerator generator(target.get(), scope, function_call,
105 Target::LOADABLE_MODULE, err);
106 generator.Run();
103 } else if (output_type == functions::kSharedLibrary) { 107 } else if (output_type == functions::kSharedLibrary) {
104 BinaryTargetGenerator generator(target.get(), scope, function_call, 108 BinaryTargetGenerator generator(target.get(), scope, function_call,
105 Target::SHARED_LIBRARY, err); 109 Target::SHARED_LIBRARY, err);
106 generator.Run(); 110 generator.Run();
107 } else if (output_type == functions::kSourceSet) { 111 } else if (output_type == functions::kSourceSet) {
108 BinaryTargetGenerator generator(target.get(), scope, function_call, 112 BinaryTargetGenerator generator(target.get(), scope, function_call,
109 Target::SOURCE_SET, err); 113 Target::SOURCE_SET, err);
110 generator.Run(); 114 generator.Run();
111 } else if (output_type == functions::kStaticLibrary) { 115 } else if (output_type == functions::kStaticLibrary) {
112 BinaryTargetGenerator generator(target.get(), scope, function_call, 116 BinaryTargetGenerator generator(target.get(), scope, function_call,
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 352
349 bool TargetGenerator::FillGenericDeps(const char* var_name, 353 bool TargetGenerator::FillGenericDeps(const char* var_name,
350 LabelTargetVector* dest) { 354 LabelTargetVector* dest) {
351 const Value* value = scope_->GetValue(var_name, true); 355 const Value* value = scope_->GetValue(var_name, true);
352 if (value) { 356 if (value) {
353 ExtractListOfLabels(*value, scope_->GetSourceDir(), 357 ExtractListOfLabels(*value, scope_->GetSourceDir(),
354 ToolchainLabelForScope(scope_), dest, err_); 358 ToolchainLabelForScope(scope_), dest, err_);
355 } 359 }
356 return !err_->has_error(); 360 return !err_->has_error();
357 } 361 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698