Skip to content

Commit 6388533

Browse files
openeuler-ci-botgitee-org
authored andcommitted
!150 add BUILD_FOR_OPENEULER to build.sh
From: @liyunfei33 Reviewed-by: @eastB233 Signed-off-by: @eastB233
2 parents d3687c1 + 0fff28d commit 6388533

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

build.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ CXX_COMPILER_PATH=g++
77
# Initialize our own variables:
88
buildtype=RelWithDebInfo
99
backends="all"
10+
build_for_openeuler="0"
1011
enabled_projects="clang;lld;compiler-rt;openmp;clang-tools-extra"
1112
embedded_toolchain="0"
1213
split_dwarf=on
@@ -69,7 +70,7 @@ EOF
6970
# Process command-line options. Remember the options for passing to the
7071
# containerized build script.
7172
containerized_opts=()
72-
while getopts :b:d:cCehiI:j:orstvfX: optchr; do
73+
while getopts :b:d:cCeEhiI:j:orstvfX: optchr; do
7374
case "$optchr" in
7475
b)
7576
buildtype="$OPTARG"
@@ -105,6 +106,10 @@ while getopts :b:d:cCehiI:j:orstvfX: optchr; do
105106
embedded_toolchain="1"
106107
containerized_opts+=(-$optchr)
107108
;;
109+
E)
110+
build_for_openeuler="1"
111+
containerized_opts+=(-$optchr)
112+
;;
108113
h)
109114
usage
110115
exit
@@ -304,6 +309,11 @@ if [ $install_toolchain_only == "1" ]; then
304309
CMAKE_OPTIONS="$CMAKE_OPTIONS -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON"
305310
fi
306311

312+
if [ $build_for_openeuler == "1" ]; then
313+
echo "Build for openEuler"
314+
CMAKE_OPTIONS="$CMAKE_OPTIONS -DBUILD_FOR_OPENEULER=ON"
315+
fi
316+
307317
# Build and install
308318
if [ $clean -eq 1 -a -e "$install_prefix" ]; then
309319
rm -rf "$install_prefix"

0 commit comments

Comments
 (0)