Skip to content

Commit 6ee8324

Browse files
committed
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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 06c9ccd commit 6ee8324

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/runtime/cgo/gcc_darwin_arm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ init_working_dir()
103103
}
104104
CFURLRef url_ref = CFBundleCopyResourceURL(bundle, CFSTR("Info"), CFSTR("plist"), NULL);
105105
if (url_ref == NULL) {
106-
fprintf(stderr, "runtime/cgo: no Info.plist URL\n");
106+
// No Info.plist found. It can happen on Corellium virtual devices.
107107
return;
108108
}
109109
CFStringRef url_str_ref = CFURLGetString(url_ref);

src/runtime/cgo/gcc_darwin_arm64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ init_working_dir()
105105
}
106106
CFURLRef url_ref = CFBundleCopyResourceURL(bundle, CFSTR("Info"), CFSTR("plist"), NULL);
107107
if (url_ref == NULL) {
108-
fprintf(stderr, "runtime/cgo: no Info.plist URL\n");
108+
// No Info.plist found. It can happen on Corellium virtual devices.
109109
return;
110110
}
111111
CFStringRef url_str_ref = CFURLGetString(url_ref);

0 commit comments

Comments
 (0)