OLD | NEW |
1 # Copyright (c) 2012 Google Inc. All rights reserved. | 1 # Copyright (c) 2012 Google Inc. 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 from compiler.ast import Const | 5 from compiler.ast import Const |
6 from compiler.ast import Dict | 6 from compiler.ast import Dict |
7 from compiler.ast import Discard | 7 from compiler.ast import Discard |
8 from compiler.ast import List | 8 from compiler.ast import List |
9 from compiler.ast import Module | 9 from compiler.ast import Module |
10 from compiler.ast import Node | 10 from compiler.ast import Node |
(...skipping 1654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1665 include_shared_libraries, | 1665 include_shared_libraries, |
1666 dependencies, False) | 1666 dependencies, False) |
1667 | 1667 |
1668 return dependencies | 1668 return dependencies |
1669 | 1669 |
1670 def DependenciesForLinkSettings(self, targets): | 1670 def DependenciesForLinkSettings(self, targets): |
1671 """ | 1671 """ |
1672 Returns a list of dependency targets whose link_settings should be merged | 1672 Returns a list of dependency targets whose link_settings should be merged |
1673 into this target. | 1673 into this target. |
1674 """ | 1674 """ |
1675 return self._LinkDependenciesInternal(targets, False) | 1675 |
| 1676 # TODO(sbaig) Currently, chrome depends on the bug that shared libraries' |
| 1677 # link_settings are propagated. So for now, we will allow it, unless the |
| 1678 # 'allow_sharedlib_linksettings_propagation' flag is explicitly set to |
| 1679 # False. Once chrome is fixed, we can remove this flag. |
| 1680 include_shared_libraries = \ |
| 1681 targets[self.ref].get('allow_sharedlib_linksettings_propagation', True) |
| 1682 return self._LinkDependenciesInternal(targets, include_shared_libraries) |
1676 | 1683 |
1677 def DependenciesToLinkAgainst(self, targets): | 1684 def DependenciesToLinkAgainst(self, targets): |
1678 """ | 1685 """ |
1679 Returns a list of dependency targets that are linked into this target. | 1686 Returns a list of dependency targets that are linked into this target. |
1680 """ | 1687 """ |
1681 return self._LinkDependenciesInternal(targets, True) | 1688 return self._LinkDependenciesInternal(targets, True) |
1682 | 1689 |
1683 | 1690 |
1684 def BuildDependencyList(targets): | 1691 def BuildDependencyList(targets): |
1685 # Create a DependencyGraphNode for each target. Put it into a dict for easy | 1692 # Create a DependencyGraphNode for each target. Put it into a dict for easy |
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2735 ValidateRunAsInTarget(target, target_dict, build_file) | 2742 ValidateRunAsInTarget(target, target_dict, build_file) |
2736 ValidateActionsInTarget(target, target_dict, build_file) | 2743 ValidateActionsInTarget(target, target_dict, build_file) |
2737 | 2744 |
2738 # Generators might not expect ints. Turn them into strs. | 2745 # Generators might not expect ints. Turn them into strs. |
2739 TurnIntIntoStrInDict(data) | 2746 TurnIntIntoStrInDict(data) |
2740 | 2747 |
2741 # TODO(mark): Return |data| for now because the generator needs a list of | 2748 # TODO(mark): Return |data| for now because the generator needs a list of |
2742 # build files that came in. In the future, maybe it should just accept | 2749 # build files that came in. In the future, maybe it should just accept |
2743 # a list, and not the whole data dict. | 2750 # a list, and not the whole data dict. |
2744 return [flat_list, targets, data] | 2751 return [flat_list, targets, data] |
OLD | NEW |