From 6ee832438830678ed14d535f47bcef0403a35fb4 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Sun, 28 Apr 2019 09:05:16 +0200 Subject: [PATCH] runtime/cgo: ignore missing Info.plist files on iOS When running Go programs on Corellium virtual iPhones, the Info.plist files might not exist. Ignore the error. Updates #31722 Change-Id: Id2e315c09346b69dda9e10cf29fb5dba6743aac4 Reviewed-on: https://go-review.googlesource.com/c/go/+/174202 Run-TryBot: Elias Naur TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- src/runtime/cgo/gcc_darwin_arm.c | 2 +- src/runtime/cgo/gcc_darwin_arm64.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/cgo/gcc_darwin_arm.c b/src/runtime/cgo/gcc_darwin_arm.c index b1e2502b5d..205977c4ba 100644 --- a/src/runtime/cgo/gcc_darwin_arm.c +++ b/src/runtime/cgo/gcc_darwin_arm.c @@ -103,7 +103,7 @@ init_working_dir() } CFURLRef url_ref = CFBundleCopyResourceURL(bundle, CFSTR("Info"), CFSTR("plist"), NULL); if (url_ref == NULL) { - fprintf(stderr, "runtime/cgo: no Info.plist URL\n"); + // No Info.plist found. It can happen on Corellium virtual devices. return; } CFStringRef url_str_ref = CFURLGetString(url_ref); diff --git a/src/runtime/cgo/gcc_darwin_arm64.c b/src/runtime/cgo/gcc_darwin_arm64.c index a0f75910c8..e6e305789f 100644 --- a/src/runtime/cgo/gcc_darwin_arm64.c +++ b/src/runtime/cgo/gcc_darwin_arm64.c @@ -105,7 +105,7 @@ init_working_dir() } CFURLRef url_ref = CFBundleCopyResourceURL(bundle, CFSTR("Info"), CFSTR("plist"), NULL); if (url_ref == NULL) { - fprintf(stderr, "runtime/cgo: no Info.plist URL\n"); + // No Info.plist found. It can happen on Corellium virtual devices. return; } CFStringRef url_str_ref = CFURLGetString(url_ref);