Skip to content

Commit 9f3f4de

Browse files
committed
KERNEL32.dll position has moved in deps dump output, and avoid patching the CoreFoundation change for linux.
1 parent 5280d65 commit 9f3f4de

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

buildscripts/make_dependencies.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ else
3434
curl -Ls "https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-${PROTOBUF_VERSION}.tar.gz" | tar xz
3535
curl -Ls "https://github.com/abseil/abseil-cpp/archive/refs/tags/${ABSL_VERSION}.tar.gz" | tar xz
3636
rmdir "protobuf-$PROTOBUF_VERSION/third_party/abseil-cpp"
37-
patch abseil-cpp-$ABSL_VERSION/absl/time/CMakeLists.txt $BUILDSCRIPTS_DIR/absl_time_CMakeLists.patch
37+
os_name=$(uname -s)
38+
if [[ "$os_name" == "Darwin" ]]; then
39+
patch abseil-cpp-$ABSL_VERSION/absl/time/CMakeLists.txt $BUILDSCRIPTS_DIR/absl_time_CMakeLists.patch
40+
fi
3841
mv "abseil-cpp-$ABSL_VERSION" "protobuf-$PROTOBUF_VERSION/third_party/abseil-cpp"
3942
fi
4043
# the same source dir is used for 32 and 64 bit builds, so we need to clean stale data first

compiler/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ model {
110110
} else if (osdetector.os == "windows") {
111111
linker.args "-static", "-lprotoc", "-lprotobuf", "-static-libgcc", "-static-libstdc++",
112112
"-s"
113-
} else if (osdetector.arch == "ppcle_64") {
114-
linker.args "-Wl,-Bstatic", "-lprotoc", "-lprotobuf", "-Wl,-Bdynamic", "-lpthread", "-s"
115-
} else {
113+
} else if (osdetector.arch == "ppcle_64") {
114+
linker.args "-Wl,-Bstatic", "-lprotoc", "-lprotobuf", "-Wl,-Bdynamic", "-lpthread", "-s"
115+
} else {
116116
// Link protoc, protobuf, libgcc and libstdc++ statically.
117117
// Link other (system) libraries dynamically.
118118
// Clang under OSX doesn't support these options.
@@ -245,7 +245,7 @@ def checkArtifacts = tasks.register("checkArtifacts") {
245245
throw new GradleException("dumpbin exited with " + ret.exitValue)
246246
}
247247
def dlls = os.toString() =~ /Image has the following dependencies:\s+(.*)\s+Summary/
248-
if (dlls[0][1] != "KERNEL32.dll") {
248+
if (dlls[0][2] != "KERNEL32.dll") {
249249
throw new Exception("unexpected dll deps: " + dlls[0][1]);
250250
}
251251
os.reset()

0 commit comments

Comments
 (0)