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

Side by Side Diff: tools/gn/function_toolchain.cc

Issue 1842563006: DO NOT SUBMIT. Experimental Mac GN Framework support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Binary bundle data 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 unified diff | Download patch
« no previous file with comments | « tools/gn/bundle_file_rule.cc ('k') | tools/gn/ninja_create_bundle_target_writer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <algorithm> 5 #include <algorithm>
6 #include <limits> 6 #include <limits>
7 #include <utility> 7 #include <utility>
8 8
9 #include "tools/gn/err.h" 9 #include "tools/gn/err.h"
10 #include "tools/gn/functions.h" 10 #include "tools/gn/functions.h"
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 // tool type. There are different validators for the "outputs" than for the 821 // tool type. There are different validators for the "outputs" than for the
822 // rest of the strings. 822 // rest of the strings.
823 bool (*subst_validator)(SubstitutionType) = nullptr; 823 bool (*subst_validator)(SubstitutionType) = nullptr;
824 bool (*subst_output_validator)(SubstitutionType) = nullptr; 824 bool (*subst_output_validator)(SubstitutionType) = nullptr;
825 if (IsCompilerTool(tool_type)) { 825 if (IsCompilerTool(tool_type)) {
826 subst_validator = &IsValidCompilerSubstitution; 826 subst_validator = &IsValidCompilerSubstitution;
827 subst_output_validator = &IsValidCompilerOutputsSubstitution; 827 subst_output_validator = &IsValidCompilerOutputsSubstitution;
828 } else if (IsLinkerTool(tool_type)) { 828 } else if (IsLinkerTool(tool_type)) {
829 subst_validator = &IsValidLinkerSubstitution; 829 subst_validator = &IsValidLinkerSubstitution;
830 subst_output_validator = &IsValidLinkerOutputsSubstitution; 830 subst_output_validator = &IsValidLinkerOutputsSubstitution;
831 } else if (tool_type == Toolchain::TYPE_COPY || 831 } else if (tool_type == Toolchain::TYPE_COPY) {
832 tool_type == Toolchain::TYPE_COPY_BUNDLE_DATA) {
833 subst_validator = &IsValidCopySubstitution; 832 subst_validator = &IsValidCopySubstitution;
834 subst_output_validator = &IsValidCopySubstitution; 833 subst_output_validator = &IsValidCopySubstitution;
834 } else if (tool_type == Toolchain::TYPE_COPY_BUNDLE_DATA) {
835 subst_validator = &IsValidCopyBundleDataSubstitution;
836 subst_output_validator = &IsValidCopyBundleDataSubstitution;
835 } else if (tool_type == Toolchain::TYPE_COMPILE_XCASSETS) { 837 } else if (tool_type == Toolchain::TYPE_COMPILE_XCASSETS) {
836 subst_validator = &IsValidCompileXCassetsSubstitution; 838 subst_validator = &IsValidCompileXCassetsSubstitution;
837 subst_output_validator = &IsValidCompileXCassetsSubstitution; 839 subst_output_validator = &IsValidCompileXCassetsSubstitution;
838 } else { 840 } else {
839 subst_validator = &IsValidToolSubstitution; 841 subst_validator = &IsValidToolSubstitution;
840 subst_output_validator = &IsValidToolSubstitution; 842 subst_output_validator = &IsValidToolSubstitution;
841 } 843 }
842 844
843 scoped_ptr<Tool> tool(new Tool); 845 scoped_ptr<Tool> tool(new Tool);
844 846
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 return Value(); 1011 return Value();
1010 1012
1011 Scope::KeyValueMap values; 1013 Scope::KeyValueMap values;
1012 block_scope.GetCurrentScopeValues(&values); 1014 block_scope.GetCurrentScopeValues(&values);
1013 toolchain->args() = values; 1015 toolchain->args() = values;
1014 1016
1015 return Value(); 1017 return Value();
1016 } 1018 }
1017 1019
1018 } // namespace functions 1020 } // namespace functions
OLDNEW
« no previous file with comments | « tools/gn/bundle_file_rule.cc ('k') | tools/gn/ninja_create_bundle_target_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698