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

Unified Diff: tools/gn/command_desc.cc

Issue 1919813003: Apply arflags to dependent configs in GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | tools/gn/config_values.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/command_desc.cc
diff --git a/tools/gn/command_desc.cc b/tools/gn/command_desc.cc
index 15efe77cd6ed493c99f78168b3c660e36bf4500a..021232c1243c139f7e643d0d02a63f7ee04dd4eb 100644
--- a/tools/gn/command_desc.cc
+++ b/tools/gn/command_desc.cc
@@ -524,6 +524,7 @@ const char kDesc_Help[] =
" outputs\n"
" Outputs for script and copy target types.\n"
"\n"
+ " arflags [--blame]\n"
" defines [--blame]\n"
" include_dirs [--blame]\n"
" cflags [--blame]\n"
@@ -662,9 +663,11 @@ int RunDesc(const std::vector<std::string>& args) {
PrintLibs(target, false);
} else if (what == "runtime_deps") {
PrintRuntimeDeps(target);
+// } Hidden closing brace in macro below.
CONFIG_VALUE_HANDLER(defines, std::string)
CONFIG_VALUE_HANDLER(include_dirs, SourceDir)
+ CONFIG_VALUE_HANDLER(arflags, std::string)
CONFIG_VALUE_HANDLER(asmflags, std::string)
CONFIG_VALUE_HANDLER(cflags, std::string)
CONFIG_VALUE_HANDLER(cflags_c, std::string)
@@ -733,7 +736,11 @@ int RunDesc(const std::vector<std::string>& args) {
OUTPUT_CONFIG_VALUE(cflags_cc, std::string)
OUTPUT_CONFIG_VALUE(cflags_objc, std::string)
OUTPUT_CONFIG_VALUE(cflags_objcc, std::string)
- OUTPUT_CONFIG_VALUE(ldflags, std::string)
+
+ if (target->output_type() == Target::STATIC_LIBRARY)
+ OUTPUT_CONFIG_VALUE(arflags, std::string)
+ else if (target->output_type() != Target::SOURCE_SET)
+ OUTPUT_CONFIG_VALUE(ldflags, std::string)
}
if (target->output_type() == Target::ACTION ||
« no previous file with comments | « no previous file | tools/gn/config_values.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698