| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "tools/gn/filesystem_utils.h" | 5 #include "tools/gn/filesystem_utils.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 if (extension == "h") | 172 if (extension == "h") |
| 173 return SOURCE_H; | 173 return SOURCE_H; |
| 174 if (extension == "c") | 174 if (extension == "c") |
| 175 return SOURCE_C; | 175 return SOURCE_C; |
| 176 if (extension == "m") | 176 if (extension == "m") |
| 177 return SOURCE_M; | 177 return SOURCE_M; |
| 178 if (extension == "mm") | 178 if (extension == "mm") |
| 179 return SOURCE_MM; | 179 return SOURCE_MM; |
| 180 if (extension == "rc") | 180 if (extension == "rc") |
| 181 return SOURCE_RC; | 181 return SOURCE_RC; |
| 182 if (extension == "S") | 182 if (extension == "S" || extension == "s") |
| 183 return SOURCE_S; | 183 return SOURCE_S; |
| 184 | 184 |
| 185 return SOURCE_UNKNOWN; | 185 return SOURCE_UNKNOWN; |
| 186 } | 186 } |
| 187 | 187 |
| 188 const char* GetExtensionForOutputType(Target::OutputType type, | 188 const char* GetExtensionForOutputType(Target::OutputType type, |
| 189 Settings::TargetOS os) { | 189 Settings::TargetOS os) { |
| 190 switch (os) { | 190 switch (os) { |
| 191 case Settings::MAC: | 191 case Settings::MAC: |
| 192 switch (type) { | 192 switch (type) { |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 return GetGenDirForSourceDir(target->settings(), target->label().dir()); | 708 return GetGenDirForSourceDir(target->settings(), target->label().dir()); |
| 709 } | 709 } |
| 710 | 710 |
| 711 SourceDir GetCurrentOutputDir(const Scope* scope) { | 711 SourceDir GetCurrentOutputDir(const Scope* scope) { |
| 712 return GetOutputDirForSourceDir(scope->settings(), scope->GetSourceDir()); | 712 return GetOutputDirForSourceDir(scope->settings(), scope->GetSourceDir()); |
| 713 } | 713 } |
| 714 | 714 |
| 715 SourceDir GetCurrentGenDir(const Scope* scope) { | 715 SourceDir GetCurrentGenDir(const Scope* scope) { |
| 716 return GetGenDirForSourceDir(scope->settings(), scope->GetSourceDir()); | 716 return GetGenDirForSourceDir(scope->settings(), scope->GetSourceDir()); |
| 717 } | 717 } |
| OLD | NEW |