]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/cgo: ignore missing Info.plist files on iOS
authorElias Naur <mail@eliasnaur.com>
Sun, 28 Apr 2019 07:05:16 +0000 (09:05 +0200)
committerElias Naur <mail@eliasnaur.com>
Mon, 29 Apr 2019 19:09:29 +0000 (19:09 +0000)
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 <mail@eliasnaur.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/runtime/cgo/gcc_darwin_arm.c
src/runtime/cgo/gcc_darwin_arm64.c

index b1e2502b5d347b849b596840db0936294b2dd3fe..205977c4ba5e41acac071be9cde48c06667c0bec 100644 (file)
@@ -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);
index a0f75910c8fa0e0050ec05a014fd80c9f6853c25..e6e305789f1a2984e595aedfbdea4618721b56fa 100644 (file)
@@ -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);