Prevent propogation to configurations of nested 'dependent-settings' directives

Change-Id: Icc615e5ff6aeb7dd360a9c133538a2bfab05401a
Reviewed-on: https://chromium-review.googlesource.com/c/external/gyp/+/1946603
Reviewed-by: Mark Mentovai <mark@chromium.org>
diff --git a/pylib/gyp/input.py b/pylib/gyp/input.py
index 42c279c..4c12891 100644
--- a/pylib/gyp/input.py
+++ b/pylib/gyp/input.py
@@ -102,11 +102,13 @@
 base_non_configuration_keys = [
   # Sections that must exist inside targets and not configurations.
   'actions',
+  'all_dependent_settings',
   'configurations',
   'copies',
   'default_configuration',
   'dependencies',
   'dependencies_original',
+  'direct_dependent_settings',
   'libraries',
   'postbuilds',
   'product_dir',
diff --git a/test/dependent-settings/nested-dependent-settings/all-dependent-settings.gyp b/test/dependent-settings/nested-dependent-settings/all-dependent-settings.gyp
new file mode 100644
index 0000000..b67ccae
--- /dev/null
+++ b/test/dependent-settings/nested-dependent-settings/all-dependent-settings.gyp
@@ -0,0 +1,19 @@
+{
+    "targets": [
+        {
+            "target_name": "settings",
+            "type": "none",
+            "all_dependent_settings": {
+                "target_conditions": [
+                    ["'library' in _type", {"all_dependent_settings": {}}]
+                ]
+            },
+        },
+        {
+            "target_name": "library",
+            "type": "static_library",
+            "dependencies": ["settings"],
+        },
+    ]
+}
+
diff --git a/test/dependent-settings/nested-dependent-settings/direct-dependent-settings.gyp b/test/dependent-settings/nested-dependent-settings/direct-dependent-settings.gyp
new file mode 100644
index 0000000..6e8a616
--- /dev/null
+++ b/test/dependent-settings/nested-dependent-settings/direct-dependent-settings.gyp
@@ -0,0 +1,19 @@
+{
+    "targets": [
+        {
+            "target_name": "settings",
+            "type": "none",
+            "all_dependent_settings": {
+                "target_conditions": [
+                    ["'library' in _type", {"direct_dependent_settings": {}}]
+                ]
+            },
+        },
+        {
+            "target_name": "library",
+            "type": "static_library",
+            "dependencies": ["settings"],
+        },
+    ]
+}
+
diff --git a/test/dependent-settings/nested-dependent-settings/gyptest-nested-dependent-settings.py b/test/dependent-settings/nested-dependent-settings/gyptest-nested-dependent-settings.py
new file mode 100644
index 0000000..a45de89
--- /dev/null
+++ b/test/dependent-settings/nested-dependent-settings/gyptest-nested-dependent-settings.py
@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+
+# Copyright (c) 2009 Google Inc. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""
+Verifies nested dependent_settings directives project generation.
+"""
+
+import TestGyp
+
+test = TestGyp.TestGyp()
+
+test.run_gyp("all-dependent-settings.gyp")
+test.run_gyp("direct-dependent-settings.gyp")
+
+test.pass_test()