dawn: Fix GetExecutablePath for iOS.

Change-Id: Ibde0793471606b9db783991aeb46e284225d5783
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14624
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Danusch Merrikh-Yazdi <danusch@google.com>
This commit is contained in:
Danusch Merrikh-Yazdi 2019-12-17 18:01:02 +00:00 committed by Commit Bot service account
parent c073adaa76
commit bee45bb79c
1 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@
# include <limits.h> # include <limits.h>
# include <unistd.h> # include <unistd.h>
# include <cstdlib> # include <cstdlib>
#elif defined(DAWN_PLATFORM_MACOS) #elif defined(DAWN_PLATFORM_MACOS) || defined(DAWN_PLATFORM_IOS)
# include <mach-o/dyld.h> # include <mach-o/dyld.h>
# include <vector> # include <vector>
#endif #endif
@ -88,7 +88,7 @@ std::string GetExecutablePath() {
path[result] = '\0'; path[result] = '\0';
return path.data(); return path.data();
} }
#elif defined(DAWN_PLATFORM_MACOS) #elif defined(DAWN_PLATFORM_MACOS) || defined(DAWN_PLATFORM_IOS)
std::string GetExecutablePath() { std::string GetExecutablePath() {
uint32_t size = 0; uint32_t size = 0;
_NSGetExecutablePath(nullptr, &size); _NSGetExecutablePath(nullptr, &size);