Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion cmake/zephyr/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ config PICOLIBC_DEFAULT
Zephyr SDK >=0.17.1 always uses Picolibc

choice COMPILER_OPTIMIZATIONS
default SPEED_OPTIMIZATIONS if "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "zephyr" && CPP_EXCEPTIONS
default SPEED_OPTIMIZATIONS if ("$(ZEPHYR_TOOLCHAIN_VARIANT)" = "zephyr" || "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "zephyr-gnu") && CPP_EXCEPTIONS
endchoice
33 changes: 33 additions & 0 deletions contrib/linux_build_llvm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash

# Script to mimic how CI is building llvm toolchain.

# Default is to use current directory as the working directory.
# SDK is under ${WORKING_ROOT_DIR}/sdk-ng/
# Build directory is ${WORKING_ROOT_DIR}/build-workspace/
WORKING_ROOT_DIR="${PWD}"
SDK_DIR="${WORKING_ROOT_DIR}/sdk-ng"
BUILD_DIR="${WORKING_ROOT_DIR}/build-workspace"

pushd "${BUILD_DIR}"
mkdir -p llvm-build
mkdir -p llvm

#TEST=echo
cd llvm-build
$TEST cmake \
-GNinja \
--install-prefix="${BUILD_DIR}"/llvm \
-DLLVM_ENABLE_ZSTD=OFF \
${LLVM_CMAKE_ARGS} \
"${SDK_DIR}"/scripts/llvm || exit 1

# Build LLVM toolchain
$TEST ninja llvm-toolchain || exit 1

# Run LLVM tests
$TEST ninja check-llvm-toolchain || exit 1

# Install LLVM toolchain
$TEST ninja install-llvm-toolchain || exit 1
popd
12 changes: 12 additions & 0 deletions scripts/llvm/test-support/run-picolibc-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,18 @@ def run_tests(meson_command, source_dir, build_dir, variant):
check=True,
)

# Newer meson doesn't apply new configuration with the above
# operation, so *also* run a regular configure step
subprocess.run(
[
meson_command,
"configure",
"-Dtests=true",
],
cwd=build_dir,
check=True,
)

returncode = subprocess.run(
[meson_command, "test", "-t", "20"],
cwd=build_dir,
Expand Down
Loading