summaryrefslogtreecommitdiff
path: root/zephyr
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@chromium.org>2022-09-12 20:59:26 +0000
committerJonathon Murphy <jpmurphy@google.com>2022-09-12 21:00:49 +0000
commit3b2b654318c1375a3aa9031db087ea3845628a5d (patch)
tree39676ebde38ddc6be58fc5c7938789e733319335 /zephyr
parentbc0d97c15ebddaf11d0b5209a42324df5973840b (diff)
downloadchrome-ec-3b2b654318c1375a3aa9031db087ea3845628a5d.tar.gz
Revert "zmake: Use vpython3 in cmake"
This reverts commit 338b2fa082a886c6134ca67586d38a83bd49fe6a. Reason for revert: Breaks in emerge. Original change's description: > zmake: Use vpython3 in cmake > > Add cmake variable to force it to use vpython3 instead of auto-detecting > the path to python. This is slightly fragile due to logic in > zephyr/main/cmake/modules/python.cmake. You can pass in PYTHON_PREFER > but it will extract the version from that binary and run > /usr/bin/python${ver}, which is very strange. Pass Python3_EXECUTABLE > to bypass all of that logic, but it has to be exactly the version in > PYTHON_MINIMUM_REQUIRED or it will fail. We'll need to make sure we keep > the vpython version matched with PYTHON_MINIMUM_REQUIRED in the future. > > Update the instructions to run ram_report because it works inside the > chroot now. > > Added some missing packages to twister_launcher.py as well. I'm not sure > why this change made them start to be required, but they are. > > BRANCH=None > BUG=b:243936551 > TEST=zmake build -a > > Cq-Depend: chromium:3892212 > Signed-off-by: Jeremy Bettis <jbettis@google.com> > Change-Id: Ied285ce0b69b33a9a3b016c4bd07cab0b6a13b89 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891670 > Commit-Queue: Jeremy Bettis <jbettis@chromium.org> > Commit-Queue: Keith Short <keithshort@chromium.org> > Auto-Submit: Jeremy Bettis <jbettis@chromium.org> > Tested-by: Jeremy Bettis <jbettis@chromium.org> > Reviewed-by: Keith Short <keithshort@chromium.org> Bug: b:243936551 Change-Id: I88341eb47bf15c90d4d050e11b08e74f72f52e58 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891683 Commit-Queue: Jonathon Murphy <jpmurphy@google.com> Tested-by: Jonathon Murphy <jpmurphy@google.com> Reviewed-by: Jonathon Murphy <jpmurphy@google.com> Owners-Override: Jonathon Murphy <jpmurphy@google.com>
Diffstat (limited to 'zephyr')
-rw-r--r--zephyr/zmake/zmake/zmake.py55
1 files changed, 30 insertions, 25 deletions
diff --git a/zephyr/zmake/zmake/zmake.py b/zephyr/zmake/zmake/zmake.py
index 4cc3e3ea34..d7af2575bf 100644
--- a/zephyr/zmake/zmake/zmake.py
+++ b/zephyr/zmake/zmake/zmake.py
@@ -1,4 +1,4 @@
-# Copyright 2020 The ChromiumOS Authors
+# Copyright 2020 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -391,31 +391,36 @@ class Zmake:
shutil.rmtree(build_dir)
generated_include_dir = (build_dir / "include").resolve()
- cmake_defs = {
- "CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
- "DTS_ROOT": str(self.module_paths["ec"] / "zephyr"),
- "SYSCALL_INCLUDE_DIRS": str(
- self.module_paths["ec"] / "zephyr" / "include" / "drivers"
- ),
- "USER_CACHE_DIR": str(
- self.module_paths["ec"] / "build" / "zephyr" / "user-cache"
- ),
- "ZEPHYR_BASE": str(self.zephyr_base),
- "ZMAKE_INCLUDE_DIR": str(generated_include_dir),
- "ZMAKE_PROJECT_NAME": project.config.project_name,
- **(
- {"EXTRA_EC_VERSION_FLAGS": "--static"}
- if static_version
- else {}
- ),
- **({"EXTRA_CFLAGS": "-save-temps=obj"} if save_temps else {}),
- }
- vpython = shutil.which("vpython3")
- if vpython:
- cmake_defs["Python3_EXECUTABLE"] = vpython
-
base_config = zmake.build_config.BuildConfig(
- cmake_defs=cmake_defs,
+ cmake_defs={
+ "CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
+ "DTS_ROOT": str(self.module_paths["ec"] / "zephyr"),
+ "SYSCALL_INCLUDE_DIRS": str(
+ self.module_paths["ec"]
+ / "zephyr"
+ / "include"
+ / "drivers"
+ ),
+ "USER_CACHE_DIR": str(
+ self.module_paths["ec"]
+ / "build"
+ / "zephyr"
+ / "user-cache"
+ ),
+ "ZEPHYR_BASE": str(self.zephyr_base),
+ "ZMAKE_INCLUDE_DIR": str(generated_include_dir),
+ "ZMAKE_PROJECT_NAME": project.config.project_name,
+ **(
+ {"EXTRA_EC_VERSION_FLAGS": "--static"}
+ if static_version
+ else {}
+ ),
+ **(
+ {"EXTRA_CFLAGS": "-save-temps=obj"}
+ if save_temps
+ else {}
+ ),
+ },
)
# Prune the module paths to just those required by the project.