Skip to content

Commit b6e5dba

Browse files
Merge branch 'main' into main
2 parents e1a824a + 1be8881 commit b6e5dba

File tree

5 files changed

+48
-2
lines changed

5 files changed

+48
-2
lines changed

cmake/zephyr/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ config PICOLIBC_DEFAULT
2525
Zephyr SDK >=0.17.1 always uses Picolibc
2626

2727
choice COMPILER_OPTIMIZATIONS
28-
default SPEED_OPTIMIZATIONS if "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "zephyr" && CPP_EXCEPTIONS
28+
default SPEED_OPTIMIZATIONS if ("$(ZEPHYR_TOOLCHAIN_VARIANT)" = "zephyr" || "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "zephyr-gnu") && CPP_EXCEPTIONS
2929
endchoice

contrib/linux_build_llvm.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env bash
2+
3+
# Script to mimic how CI is building llvm toolchain.
4+
5+
# Default is to use current directory as the working directory.
6+
# SDK is under ${WORKING_ROOT_DIR}/sdk-ng/
7+
# Build directory is ${WORKING_ROOT_DIR}/build-workspace/
8+
WORKING_ROOT_DIR="${PWD}"
9+
SDK_DIR="${WORKING_ROOT_DIR}/sdk-ng"
10+
BUILD_DIR="${WORKING_ROOT_DIR}/build-workspace"
11+
12+
pushd "${BUILD_DIR}"
13+
mkdir -p llvm-build
14+
mkdir -p llvm
15+
16+
#TEST=echo
17+
cd llvm-build
18+
$TEST cmake \
19+
-GNinja \
20+
--install-prefix="${BUILD_DIR}"/llvm \
21+
-DLLVM_ENABLE_ZSTD=OFF \
22+
${LLVM_CMAKE_ARGS} \
23+
"${SDK_DIR}"/scripts/llvm || exit 1
24+
25+
# Build LLVM toolchain
26+
$TEST ninja llvm-toolchain || exit 1
27+
28+
# Run LLVM tests
29+
$TEST ninja check-llvm-toolchain || exit 1
30+
31+
# Install LLVM toolchain
32+
$TEST ninja install-llvm-toolchain || exit 1
33+
popd

contrib/linux_build_toolchain.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ CT_GDB_CROSS_PYTHON_BINARY="python3"
124124
CT_EXPERIMENTAL=y
125125
CT_ALLOW_BUILD_AS_ROOT=y
126126
CT_ALLOW_BUILD_AS_ROOT_SURE=y
127+
CT_DEBUG_CT_SAVE_STEPS=y
127128
EOF
128129

129130
"${CT_NG}" savedefconfig DEFCONFIG=build.config

scripts/llvm/test-support/run-picolibc-tests.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,18 @@ def run_tests(meson_command, source_dir, build_dir, variant):
6666
check=True,
6767
)
6868

69+
# Newer meson doesn't apply new configuration with the above
70+
# operation, so *also* run a regular configure step
71+
subprocess.run(
72+
[
73+
meson_command,
74+
"configure",
75+
"-Dtests=true",
76+
],
77+
cwd=build_dir,
78+
check=True,
79+
)
80+
6981
returncode = subprocess.run(
7082
[meson_command, "test", "-t", "20"],
7183
cwd=build_dir,

0 commit comments

Comments
 (0)