GN: components as static library instead of source set
authormtklein <mtklein@chromium.org>
Fri, 29 Jul 2016 16:10:31 +0000 (09:10 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 29 Jul 2016 16:10:31 +0000 (09:10 -0700)
This also puts the .a in the top-level of the ouptut directory, just
like we do for .so files.  It's less required than for .sos, but it
does make it easier to find the .a.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2197633002

Review-Url: https://codereview.chromium.org/2197633002

gn/BUILD.gn
gn/BUILDCONFIG.gn

index e514bc3be4c4f5d154c9665482cb36310b76a6d2..5789aef48b38e0a261e923ab0b5020778e596a50 100644 (file)
@@ -88,7 +88,7 @@ toolchain("gcc_like") {
   tool("alink") {
     command = "rm -f {{output}} && $ar rcs {{output}} {{inputs}}"
     outputs = [
-      "{{target_out_dir}}/{{target_output_name}}{{output_extension}}",
+      "{{root_out_dir}}/{{target_output_name}}{{output_extension}}",
     ]
     default_output_extension = ".a"
     output_prefix = "lib"
index 31056bda5f1b9ad11ef66d7a3a8d5a4a8cf425df..681b15b83bad2ce2a2a783c45a3ae79a7cee0765 100644 (file)
@@ -27,9 +27,9 @@ is_win = current_os == "win"
 
 is_posix = !is_win
 
-# A component is either a source_set or a shared_library.
+# A component is either a static or a shared library.
 template("component") {
-  _component_mode = "source_set"
+  _component_mode = "static_library"
   if (is_component_build) {
     _component_mode = "shared_library"
   }