Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build of esp32-m5stack-all-clusters-rpc-ipv6only for out of tree PW_ENVIRONMENT_ROOT #30473

Merged
merged 6 commits into from
Nov 15, 2023
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 26 additions & 5 deletions examples/build_overrides/pigweed_environment.gni
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,42 @@ _bootstrap_root = "//third_party/connectedhomeip"

import("${_bootstrap_root}/build_overrides/pigweed_environment.gni")

# Rebase paths to our root.
#
# If out of tree, the paths will look like:
#
# pw_env_setup_CIPD_PIGWEED = "//../home/vscode/pigweed/env/cipd/packages/pigweed"
#
# and these paths are used by things like protoc since
# https://github.com/google/pigweed/commit/ddbc9fc7f5c601ab417db37e02cbe5294f21ad6d
#
# See https://github.com/project-chip/connectedhomeip/issues/30475
#
# Existing logic:
# - this file is imported from `examples/common/pigweed` or similar
# - we transform paths from "//../" into "//../../../"
#
# TODO: need a better expansion here. This replacement logic seems very brittle and
# it is unclear how we know exactly 3 levels of indirections are correct
#

# Rebase paths to our root.
if (defined(pw_env_setup_CIPD_ARM)) {
pw_env_setup_CIPD_ARM =
get_path_info("${_bootstrap_root}/${pw_env_setup_CIPD_ARM}", "abspath")
get_path_info(rebase_path(pw_env_setup_CIPD_ARM, "", _bootstrap_root), "abspath")
}

if (defined(pw_env_setup_CIPD_PIGWEED)) {
pw_env_setup_CIPD_PIGWEED =
get_path_info("${_bootstrap_root}/${pw_env_setup_CIPD_PIGWEED}",
"abspath")
get_path_info(rebase_path(pw_env_setup_CIPD_PIGWEED, "", _bootstrap_root), "abspath")
}

if (defined(pw_env_setup_CIPD_PYTHON)) {
pw_env_setup_CIPD_PYTHON =
get_path_info("${_bootstrap_root}/${pw_env_setup_CIPD_PYTHON}", "abspath")
get_path_info(rebase_path(pw_env_setup_CIPD_PYTHON, "", _bootstrap_root), "abspath")
}

if (defined(pw_env_setup_VIRTUAL_ENV)) {
pw_env_setup_VIRTUAL_ENV =
get_path_info("${_bootstrap_root}/${pw_env_setup_VIRTUAL_ENV}", "abspath")
get_path_info(rebase_path(pw_env_setup_VIRTUAL_ENV, "", _bootstrap_root), "abspath")
}
Loading