Skip to content

Commit 110af9b

Browse files
authored
Fix build directory for ATfE's build and test scripts (#30)
This fixes the build directory used by the Arm Toolchain for Embedded's build and test scripts, ensuring the directory is consistent across them.
1 parent 6eeb414 commit 110af9b

File tree

4 files changed

+29
-9
lines changed

4 files changed

+29
-9
lines changed
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11

22
REM A bat script to build the Arm Toolchain for Embedded
33

4+
REM The script creates a build of the toolchain in the 'build' directory, inside
5+
REM the repository tree.
6+
47
set SCRIPT_DIR=%~dp0
58
for /f %%i in ('git -C %SCRIPT_DIR% rev-parse --show-toplevel') do set REPO_ROOT=%%i
69

710
vcvars64.bat
811

9-
mkdir build
10-
cd build
12+
mkdir %REPO_ROOT%\build
13+
cd %REPO_ROOT%\build
1114

12-
cmake %REPO_ROOT%\arm-software\embedded -GNinja -DFETCHCONTENT_QUIET=OFF
15+
cmake ..\arm-software\embedded -GNinja -DFETCHCONTENT_QUIET=OFF
1316
ninja package-llvm-toolchain

arm-software/embedded/scripts/build.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
# A bash script to build the Arm Toolchain for Embedded
44

5+
# The script creates a build of the toolchain in the 'build' directory, inside
6+
# the repository tree.
7+
58
set -ex
69

710
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
@@ -12,8 +15,8 @@ clang --version
1215
export CC=clang
1316
export CXX=clang++
1417

15-
mkdir build
16-
cd build
18+
mkdir -p ${REPO_ROOT}/build
19+
cd ${REPO_ROOT}/build
1720

18-
cmake ${REPO_ROOT}/arm-software/embedded -GNinja -DFETCHCONTENT_QUIET=OFF
21+
cmake ../arm-software/embedded -GNinja -DFETCHCONTENT_QUIET=OFF
1922
ninja package-llvm-toolchain
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11

22
REM A bat script to run the tests from the Arm Toolchain for Embedded
33

4+
REM The script assumes a successful build of the toolchain exists in the 'build'
5+
REM directory inside the repository tree.
6+
7+
set SCRIPT_DIR=%~dp0
8+
for /f %%i in ('git -C %SCRIPT_DIR% rev-parse --show-toplevel') do set REPO_ROOT=%%i
9+
410
vcvars64.bat
511

6-
cd arm-toolchain\build
12+
cd %REPO_ROOT%\build
713
ninja check-llvm-toolchain

arm-software/embedded/scripts/test.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
#!/bin/bash
22

3-
# A bash script to run the tests from the Arm Toolchain for Embedded
3+
# A bash script to run the tests from the Arm Toolchain for Embedded.
44

5-
cd arm-toolchain/build
5+
# The script assumes a successful build of the toolchain exists in the 'build'
6+
# directory inside the repository tree.
7+
8+
set -ex
9+
10+
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
11+
REPO_ROOT=$( git -C ${SCRIPT_DIR} rev-parse --show-toplevel )
12+
13+
cd ${REPO_ROOT}/build
614
ninja check-llvm-toolchain

0 commit comments

Comments
 (0)