Index: tools/gn/ninja_helper.cc |
diff --git a/tools/gn/ninja_helper.cc b/tools/gn/ninja_helper.cc |
index c3d275bc51e73aa1bf831f9ce43d59548bc5e11a..e4f4082817a713a5e5f9ba4c0f9c9b8ab81674c9 100644 |
--- a/tools/gn/ninja_helper.cc |
+++ b/tools/gn/ninja_helper.cc |
@@ -116,12 +116,12 @@ OutputFile NinjaHelper::GetTargetOutputFile(const Target* target) const { |
// This is prepended to the output file name. |
const char* prefix; |
- if (target->settings()->IsWin() || |
- target->output_type() == Target::EXECUTABLE) { |
- prefix = ""; |
- } else { |
+ if (!target->settings()->IsWin() && |
+ (target->output_type() == Target::SHARED_LIBRARY || |
+ target->output_type() == Target::STATIC_LIBRARY)) |
prefix = "lib"; |
- } |
+ else |
+ prefix = ""; |
const char* extension; |
if (target->output_type() == Target::NONE || |