Skip to content

Commit ee71c63

Browse files
committed
add a script for AL2 build in release mode
1 parent d1035e2 commit ee71c63

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
# SPDX-License-Identifier: Apache-2.0.
4+
5+
# This script is an example of how to build the SDK on Release build-type with minimize on
6+
# Directories created and files are prefixed with PREFIX_DIR argument
7+
# A clone of aws-sdk-cpp is expected to be in ${PREFIX_DIR}/aws-sdk-cpp
8+
# Platform: Amazon Linux 2
9+
10+
set -e
11+
12+
if [ "$#" -ne 1 ]; then
13+
echo "Usage: ${0} PREFIX_DIR"
14+
exit 1
15+
fi
16+
PREFIX_DIR="$1"
17+
18+
mkdir "${PREFIX_DIR}/al2-build"
19+
mkdir "${PREFIX_DIR}/al2-install"
20+
cd "${PREFIX_DIR}/al2-build"
21+
cmake -GNinja ../aws-sdk-cpp -DCMAKE_BUILD_TYPE=Release -DMINIMIZE_SIZE=ON -DCMAKE_INSTALL_PREFIX="${PREFIX_DIR}/al2-install" -DBUILD_PERFORMANCE_TESTS=ON
22+
ninja-build -j $(grep -c ^processor /proc/cpuinfo)
23+
ninja-build install

0 commit comments

Comments
 (0)