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

Unified Diff: tools/gn/target.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 side-by-side diff with in-line comments
Download patch
Index: tools/gn/target.cc
diff --git a/tools/gn/target.cc b/tools/gn/target.cc
index a27a5c4f944fe285b9e97a21cb91693bcea7611f..94cc2e06e824138199edc46c879b9f14042dde45 100644
--- a/tools/gn/target.cc
+++ b/tools/gn/target.cc
@@ -125,6 +125,8 @@ const char* Target::GetStringForOutputType(OutputType type) {
return "Group";
case EXECUTABLE:
return "Executable";
+ case LOADABLE_MODULE:
+ return "Loadable module";
case SHARED_LIBRARY:
return "Shared library";
case STATIC_LIBRARY:
@@ -193,7 +195,9 @@ bool Target::IsLinkable() const {
}
bool Target::IsFinal() const {
- return output_type_ == EXECUTABLE || output_type_ == SHARED_LIBRARY ||
+ return output_type_ == EXECUTABLE ||
+ output_type_ == SHARED_LIBRARY ||
+ output_type_ == LOADABLE_MODULE ||
(output_type_ == STATIC_LIBRARY && complete_static_lib_);
}
@@ -350,8 +354,9 @@ void Target::FillOutputFiles() {
break;
}
case EXECUTABLE:
- // Executables don't get linked to, but the first output is used for
- // dependency management.
+ case LOADABLE_MODULE:
+ // Executables and loadable modules don't get linked to, but the first
+ // output is used for dependency management.
CHECK_GE(tool->outputs().list().size(), 1u);
check_tool_outputs = true;
dependency_output_file_ =

Powered by Google App Engine
This is Rietveld 408576698