| 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 # ============================================================================= | 5 # ============================================================================= |
| 6 # PLATFORM SELECTION | 6 # PLATFORM SELECTION |
| 7 # ============================================================================= | 7 # ============================================================================= |
| 8 # | 8 # |
| 9 # There are two main things to set: "os" and "cpu". The "toolchain" is the name | 9 # There are two main things to set: "os" and "cpu". The "toolchain" is the name |
| 10 # of the GN thing that encodes combinations of these things. | 10 # of the GN thing that encodes combinations of these things. |
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 invoker.component_never_use_source_set | 593 invoker.component_never_use_source_set |
| 594 assert(_never_use_source_set || true) # Mark as used. | 594 assert(_never_use_source_set || true) # Mark as used. |
| 595 if (is_component_build) { | 595 if (is_component_build) { |
| 596 _component_mode = "shared_library" | 596 _component_mode = "shared_library" |
| 597 } else if (_never_use_source_set) { | 597 } else if (_never_use_source_set) { |
| 598 _component_mode = "static_library" | 598 _component_mode = "static_library" |
| 599 } else { | 599 } else { |
| 600 _component_mode = "source_set" | 600 _component_mode = "source_set" |
| 601 } | 601 } |
| 602 target(_component_mode, target_name) { | 602 target(_component_mode, target_name) { |
| 603 forward_variables_from(invoker, "*") | 603 # Explicitly forward visibility, implicitly forward everything else. |
| 604 # Forwarding "*" doesn't recurse into nested scopes (to avoid copying all |
| 605 # globals into each template invocation), so won't pick up file-scoped |
| 606 # variables. Normally this isn't too bad, but visibility is commonly |
| 607 # defined at the file scope. Explicitly forwarding visibility and then |
| 608 # excluding it from the "*" set works around this problem. |
| 609 # See http://crbug.com/594610 |
| 610 forward_variables_from(invoker, [ "visibility" ]) |
| 611 forward_variables_from(invoker, "*", [ "visibility" ]) |
| 604 | 612 |
| 605 # All shared libraries must have the sanitizer deps to properly link in | 613 # All shared libraries must have the sanitizer deps to properly link in |
| 606 # asan mode (this target will be empty in other cases). | 614 # asan mode (this target will be empty in other cases). |
| 607 if (!defined(deps)) { | 615 if (!defined(deps)) { |
| 608 deps = [] | 616 deps = [] |
| 609 } | 617 } |
| 610 deps += [ "//build/config/sanitizers:deps" ] | 618 deps += [ "//build/config/sanitizers:deps" ] |
| 611 } | 619 } |
| 612 } | 620 } |
| OLD | NEW |