Skip to content

Commit b25b582

Browse files
committed
Add -static-executable and -latomic
As mentioned in Issue #3.
1 parent 616662e commit b25b582

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

scripts/swift-lambda-build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ spmBuild() {
255255

256256
# use static linking for Lambda
257257
if [[ "x${static}" = "xyes" ]]; then
258-
STATIC_LINK_OPT="-Xswiftc -static-stdlib"
258+
STATIC_LINK_OPT="-Xswiftc -static-stdlib -Xswiftc -static-executable"
259259
for static_lib in "${static_libs_a[@]}"; do
260260
STATIC_LINK_OPT="${STATIC_LINK_OPT} -Xswiftc -l${static_lib}"
261261
done

scripts/swift-lambda-env

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,13 @@ static=${static:=no}
7777
if [[ "x${static}" = "xyes" ]]; then
7878
# linking higher level stuff doesn't work quite right yet
7979
#static_libs=${static_libs:=CoreFoundation CFXMLInterface FoundationXML icui18nswift icuucswift icudataswift DispatchStubs}
80-
static_libs=${static_libs:=icui18nswift icuucswift icudataswift DispatchStubs dispatch}
80+
static_libs=${static_libs:=icui18nswift icuucswift icudataswift DispatchStubs dispatch atomic}
8181
IFS=', ' read -r -a static_libs_a <<< "$static_libs"
8282
else
8383
static_libs=
8484
static_libs_a=()
8585
fi
8686

87-
8887
BUILD_IN_XCODE=no
8988
if [[ -d "$PWD/Sources" ]]; then
9089
SRCROOT=${SRCROOT:=$PWD} # CAREFUL - Different Meaning!!!

0 commit comments

Comments
 (0)