summaryrefslogtreecommitdiff
path: root/gn
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-10-08 17:23:50 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-10-09 16:44:14 +0000
commit508fda09daa48aea05d7a1529108d8154e693d9f (patch)
tree7bfc84471e6caaf37b4a79b0c3d0de41ba20eb92 /gn
parent3f8994c671d1cfc674ab64e118304b897a84762c (diff)
downloadqtwebengine-chromium-508fda09daa48aea05d7a1529108d8154e693d9f.tar.gz
Add support for static-libraries to our GN integration
Change-Id: Icebdcbadcc4b6d2959dbab775af3045dd76c5898 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'gn')
-rw-r--r--gn/tools/gn/qmake_link_writer.cc4
-rw-r--r--gn/tools/gn/target.cc3
2 files changed, 5 insertions, 2 deletions
diff --git a/gn/tools/gn/qmake_link_writer.cc b/gn/tools/gn/qmake_link_writer.cc
index f7036b85dca..4e205e50b93 100644
--- a/gn/tools/gn/qmake_link_writer.cc
+++ b/gn/tools/gn/qmake_link_writer.cc
@@ -87,8 +87,8 @@ void PrintSourceFile(std::ostream& out, PathOutput& path_output, const SourceFil
void QMakeLinkWriter::Run() {
- CHECK(target_->output_type() == Target::SHARED_LIBRARY)
- << "QMakeLinkWriter only supports SHARED_LIBRARY";
+ CHECK(target_->output_type() == Target::SHARED_LIBRARY || target_->output_type() == Target::STATIC_LIBRARY)
+ << "QMakeLinkWriter only supports libraries";
std::vector<SourceFile> object_files;
std::vector<SourceFile> other_files;
diff --git a/gn/tools/gn/target.cc b/gn/tools/gn/target.cc
index b6acc543217..8b3e90fba99 100644
--- a/gn/tools/gn/target.cc
+++ b/gn/tools/gn/target.cc
@@ -668,6 +668,9 @@ void Target::FillOutputFiles() {
link_output_file_ = dependency_output_file_ =
SubstitutionWriter::ApplyPatternToLinkerAsOutputFile(
this, tool, tool->outputs().list()[0]);
+ if (create_pri_file()) {
+ dependency_output_file_ = OutputFile(label().name() + ".stamp");
+ }
break;
case SHARED_LIBRARY:
CHECK(tool->outputs().list().size() >= 1);