Skip to content

Commit abbbb2a

Browse files
authored
[ATfE] Add scripts to build newlib and llvmlibc overlay packages (#63)
This introduces two new scripts for building ovelay library packages for the Arm Toolchain for Embedded, one for the newlib overlay and one for the llvmlibc overlay. The scripts follow the same approach as the existing `build.sh` script, but using different build directories and providing the corresponding CMake options for each overlay package.
1 parent 86ddd81 commit abbbb2a

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
# A bash script to build the llvmlibc overlay for the Arm Toolchain for Embedded
4+
5+
# The script creates a build of the toolchain in the 'build_llvmlibc_overlay'
6+
# directory, inside the repository tree.
7+
8+
set -ex
9+
10+
export CC=clang
11+
export CXX=clang++
12+
13+
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
14+
REPO_ROOT=$( git -C ${SCRIPT_DIR} rev-parse --show-toplevel )
15+
BUILD_DIR=${REPO_ROOT}/build_llvmlibc_overlay
16+
17+
mkdir -p ${BUILD_DIR}
18+
cd ${BUILD_DIR}
19+
20+
cmake ../arm-software/embedded -GNinja -DFETCHCONTENT_QUIET=OFF -DLLVM_TOOLCHAIN_C_LIBRARY=llvmlibc -DLLVM_TOOLCHAIN_LIBRARY_OVERLAY_INSTALL=on
21+
ninja package-llvm-toolchain
22+
23+
# The package-llvm-toolchain target will produce a .tar.xz package, but we also
24+
# a zip version for Windows users
25+
cpack -G ZIP
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
# A bash script to build the newlib overlay for the Arm Toolchain for Embedded
4+
5+
# The script creates a build of the toolchain in the 'build_newlib_overlay'
6+
# directory, inside the repository tree.
7+
8+
set -ex
9+
10+
export CC=clang
11+
export CXX=clang++
12+
13+
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
14+
REPO_ROOT=$( git -C ${SCRIPT_DIR} rev-parse --show-toplevel )
15+
BUILD_DIR=${REPO_ROOT}/build_newlib_overlay
16+
17+
mkdir -p ${BUILD_DIR}
18+
cd ${BUILD_DIR}
19+
20+
cmake ../arm-software/embedded -GNinja -DFETCHCONTENT_QUIET=OFF -DLLVM_TOOLCHAIN_C_LIBRARY=newlib -DLLVM_TOOLCHAIN_LIBRARY_OVERLAY_INSTALL=on
21+
ninja package-llvm-toolchain
22+
23+
# The package-llvm-toolchain target will produce a .tar.xz package, but we also
24+
# a zip version for Windows users
25+
cpack -G ZIP

0 commit comments

Comments
 (0)