Skip to content

Commit adcbaf5

Browse files
Marco Magdymarcomagdy
Marco Magdy
authored andcommitted
Use the Lambda executable as the bootstrap when glibc is not required
1 parent e08ca6e commit adcbaf5

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

packaging/packager

+2-11
Original file line numberDiff line numberDiff line change
@@ -171,20 +171,11 @@ exec \$LAMBDA_TASK_ROOT/lib/$PKG_LD --library-path \$LAMBDA_TASK_ROOT/lib \$LAMB
171171
EOF
172172
)
173173

174-
bootstrap_script_no_libc=$(cat <<EOF
175-
#!/bin/bash
176-
set -euo pipefail
177-
export AWS_EXECUTION_ENV=lambda-cpp
178-
export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$LAMBDA_TASK_ROOT/lib
179-
exec \$LAMBDA_TASK_ROOT/bin/$PKG_BIN_FILENAME \${_HANDLER}
180-
EOF
181-
)
182-
183-
cp "$PKG_BIN_PATH" "$PKG_DIR/bin"
184174
if [[ $INCLUDE_LIBC == true ]]; then
175+
cp "$PKG_BIN_PATH" "$PKG_DIR/bin"
185176
echo -e "$bootstrap_script" > "$PKG_DIR/bootstrap"
186177
else
187-
echo -e "$bootstrap_script_no_libc" > "$PKG_DIR/bootstrap"
178+
cp "$PKG_BIN_PATH" "$PKG_DIR/bootstrap"
188179
fi
189180
chmod +x "$PKG_DIR/bootstrap"
190181
# some shenanigans to create the right layout in the zip file without extraneous directories

0 commit comments

Comments
 (0)