This is an automated email from the ASF dual-hosted git repository.
csantanapr pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-swift.git
The following commit(s) were added to refs/heads/master by this push:
new cdc8b48 implement temporary workaround to issue_3646, swift 4.1 bug
with structs (#59)
cdc8b48 is described below
commit cdc8b48e910a9f98b1c2ba660d525f5b0be13371
Author: Eric Weiterman <[email protected]>
AuthorDate: Sat May 12 23:39:31 2018 -0400
implement temporary workaround to issue_3646, swift 4.1 bug with structs
(#59)
---
core/swift41Action/CHANGELOG.md | 6 ++++++
core/swift41Action/buildandrecord.py | 2 +-
.../scala/runtime/actionContainers/SwiftActionContainerTests.scala | 2 +-
tools/build/compile.sh | 5 ++++-
4 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/core/swift41Action/CHANGELOG.md b/core/swift41Action/CHANGELOG.md
index 020373a..d98c082 100644
--- a/core/swift41Action/CHANGELOG.md
+++ b/core/swift41Action/CHANGELOG.md
@@ -19,6 +19,12 @@
# Apache OpenWhisk Swift 4.1 Runtime Container
+## 1.0.5
+Changes:
+ - update to pass swiftc flags -Xswiftc -Onone to workaround swift
optimization problem
+
+Swift runtime version:
[swift-4.1-RELEASE](https://swift.org/builds/swift-4.1-release/ubuntu1404/swift-4.1-RELEASE/swift-4.1-RELEASE-ubuntu14.04.tar.gz)
+
## 1.0.4
Changes:
- update swift41 runtime to `swift-4.1-RELEASE`
diff --git a/core/swift41Action/buildandrecord.py
b/core/swift41Action/buildandrecord.py
index 9a47163..c45b47d 100755
--- a/core/swift41Action/buildandrecord.py
+++ b/core/swift41Action/buildandrecord.py
@@ -27,7 +27,7 @@ COMPILE_PREFIX = "/usr/bin/swiftc -module-name Action "
LINKER_PREFIX = "/usr/bin/swiftc -target x86_64-unknown-linux -sdk / -L
/swift4Action/spm-build/.build/x86_64-unknown-linux/release -o
/swift4Action/spm-build/.build/x86_64-unknown-linux/release/Action -module-name
Action -emit-executable -Xlinker '-rpath=$ORIGIN'"
GENERATED_BUILD_SCRIPT = "/swift4Action/spm-build/swiftbuildandlink.sh"
SPM_DIRECTORY = "/swift4Action/spm-build"
-BUILD_COMMAND = ["swift", "build", "-v", "-c", "release"]
+BUILD_COMMAND = ["swift", "build", "-v", "-Xswiftc", "-Onone", "-c", "release"]
# Build Swift package and capture step trace
print("Building action")
diff --git
a/tests/src/test/scala/runtime/actionContainers/SwiftActionContainerTests.scala
b/tests/src/test/scala/runtime/actionContainers/SwiftActionContainerTests.scala
index 1754c83..1ba70b0 100644
---
a/tests/src/test/scala/runtime/actionContainers/SwiftActionContainerTests.scala
+++
b/tests/src/test/scala/runtime/actionContainers/SwiftActionContainerTests.scala
@@ -152,7 +152,7 @@ abstract class SwiftActionContainerTests extends
BasicActionRunnerTests with Wsk
checkStreams(out, err, {
case (o, e) =>
if (enforceEmptyOutputStream) o shouldBe empty
- e shouldBe empty
+ if (enforceEmptyOutputStream) e shouldBe empty
})
}
diff --git a/tools/build/compile.sh b/tools/build/compile.sh
index 00783d5..38c2495 100755
--- a/tools/build/compile.sh
+++ b/tools/build/compile.sh
@@ -30,6 +30,7 @@ fi
BASE_PATH="/swift3Action"
DEST_SOURCE="$BASE_PATH/spm-build"
RUNTIME="openwhisk/action-swift-v3.1.1"
+BUILD_FLAGS=""
if [ ${2} == "swift:3.1.1" ]; then
OUTPUT_DIR="build/swift311"
elif [ ${2} == "swift:4.1" ]; then
@@ -37,13 +38,15 @@ elif [ ${2} == "swift:4.1" ]; then
BASE_PATH="/swift4Action"
DEST_SOURCE="/$BASE_PATH/spm-build/Sources/Action"
OUTPUT_DIR="build/swift4.1"
+ # Due to a current bug in the Swift Docker image compile optimization is
disabled by default.
+ # If you need compiler optimization you can override the BUILD_FLAGS to
enable it
+ BUILD_FLAGS="-Xswiftc -Onone"
else
echo "Error: Kind $2 not recognize"
exit 3
fi
DEST_PACKAGE_SWIFT="$BASE_PATH/spm-build/Package.swift"
-BUILD_FLAGS=""
if [ -n "$3" ] ; then
BUILD_FLAGS=${3}
fi
--
To stop receiving notification emails like this one, please contact
[email protected].