-
Notifications
You must be signed in to change notification settings - Fork 159
Open
Description
When trying to build on iOS, it uses macos method by default
iPhone:~/proj mobile$ cd fsmon/
iPhone:~/proj/fsmon mobile$ make
cc -I. -Wall -DFSMON_VERSION=\"1.8.4\" -g -ggdb -mmacosx-version-min=10.12 -DTARGET_OSX=1 -o fsmon-macos main.c util.c backend/*.c -framework CoreServices
When passing "-mmacosx-version-min" to clang on iOS, it will build for macos but link for iOS, then causes the binary file could not be executed or building failure.
But when attempting make ios to compile, it will give some errors that tells xcrun not exist.
iPhone:~/proj/fsmon mobile$ make ios
make: xcrun: Command not found
make: xcrun: Command not found
arch armv7 -arch arm64 -isysroot -fembed-bitcode -flto -target arm64-apple-ios10.0 -miphoneos-version-min=10.0 -O3 -Wall -fembed-bitcode -I. -Wall -DFSMON_VERSION=\"1.8.4\" -g -ggdb -DTARGET_IOS=1 -o fsmon-ios main.c util.c backend/*.c \
-framework CoreFoundation \
-weak_framework MobileCoreServices \
-weak_framework CoreServices
arch: Can't find armv7 in PATH
make: [Makefile:80: ios] Error 1 (ignored)
xcrun --sdk iphoneos strip fsmon-ios
make: xcrun: Command not found
make: *** [Makefile:81: ios] Error 127
Unless we can simulate xcrun's behavior, we should swap sysroot to / (or some specific path that stores iphoneos sdk, I poured it in to my system paths so I will no need to specify sysroot path when compiling other source codes) and use native toolchain.
Metadata
Metadata
Assignees
Labels
No labels