Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c2ef754 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge ""Steal" single value variables in rbc inheritance" into main

parents daa3c717 8383184b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -351,6 +351,7 @@ def _percolate_inherited(configs, cfg_name, cfg, children_names):
                if cfg.get(attr, "") == "":
                    cfg[attr] = value
                    percolated_attrs[attr] = True
                    child_cfg.pop(attr)

    for attr in _options.trace_variables:
        if attr in percolated_attrs:
@@ -360,7 +361,7 @@ def __move_items(to_list, from_cfg, attr):
    value = from_cfg.get(attr, [])
    if value:
        to_list.extend(value)
        from_cfg[attr] = []
        from_cfg.pop(attr)

def _indirect(pcm_name):
    """Returns configuration item for the inherited module."""
+2 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ load(":product.rbc", "init")
load(":board.rbc", board_init = "init")
load(":board_input_vars.rbc", board_input_vars_init = "init")
load("//build/make/tests/single_value_inheritance:test.rbc", test_single_value_inheritance = "test")
load("//build/make/tests/single_value_inheritance_2:test.rbc", test_single_value_inheritance_2 = "test")
load("//build/make/tests/artifact_path_requirements:test.rbc", test_artifact_path_requirements = "test")
load("//build/make/tests/prefixed_sort_order:test.rbc", test_prefixed_sort_order = "test")
load("//build/make/tests/inherits_in_regular_variables:test.rbc", test_inherits_in_regular_variables = "test")
@@ -181,6 +182,7 @@ assert_eq("f", cfg["BAZ"])
assert_eq("", g.get("NEWVAR"))

test_single_value_inheritance()
test_single_value_inheritance_2()
test_artifact_path_requirements()
test_prefixed_sort_order()
test_inherits_in_regular_variables()
+20 −0
Original line number Diff line number Diff line
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("//build/make/core:product_config.rbc", "rblf")

def init(g, handle):
  cfg = rblf.cfg(handle)

  cfg["PRODUCT_ENABLE_UFFD_GC"] = "true"
+20 −0
Original line number Diff line number Diff line
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("//build/make/core:product_config.rbc", "rblf")

def init(g, handle):
  cfg = rblf.cfg(handle)

  cfg["PRODUCT_ENABLE_UFFD_GC"] = "default"
+21 −0
Original line number Diff line number Diff line
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("//build/make/core:product_config.rbc", "rblf")
load(":b.rbc", _b_init = "init")

def init(g, handle):
  cfg = rblf.cfg(handle)

  rblf.inherit(handle, "test/b", _b_init)
Loading