Xcode 可以显示整个编译过程的命令详情,比如 Compile、Link、Sign 等过程的命令和参数都能显示,在 Theos 上怎么显示这些呢?
使用 make messages = 1 就可以显示出详情,整个过程如下:
$ make messages=1
> Making all for tweak hook_sysctl…
set -o pipefail; (/Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile --no-print-directory --no-keep-going \
internal-library-compile \
_THEOS_CURRENT_TYPE=tweak THEOS_CURRENT_INSTANCE=hook_sysctl _THEOS_CURRENT_OPERATION=compile \
THEOS_BUILD_DIR="." _THEOS_MAKE_PARALLEL=yes)
set -o pipefail; (mkdir -p /Users/exchen/tweak/hook_sysctl/.theos/obj/debug/armv7/)
(printf "\e[0;3%im==> \e[1;39m%s…\e[m\n" 1 "Preprocessing Tweak.xm"); set -o pipefail; (/opt/theos/bin/logos.pl -c warnings=error Tweak.xm > /Users/exchen/tweak/hook_sysctl/.theos/obj/debug/armv7/Tweak.xm.mm)
==> Preprocessing Tweak.xm…
(printf "\e[0;3%im==> \e[1;39m%s…\e[m\n" 2 "Compiling Tweak.xm (armv7)"); set -o pipefail; (xcrun -sdk iphoneos clang++ -x objective-c++ -c -I"/Users/exchen/tweak/hook_sysctl" -I/opt/theos/include -I/opt/theos/vendor/include -I/opt/theos/include/_fallback -include /opt/theos/Prefix.pch -DTARGET_IPHONE=1 -O0 -Wall -Werror -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk" -D__IPHONE_OS_VERSION_MIN_REQUIRED=__IPHONE_6_0 -miphoneos-version-min=6.0 -fmodules -fcxx-modules -fmodule-name=hook_sysctl -fbuild-session-file=/Users/exchen/tweak/hook_sysctl/.theos/build_session -fmodules-prune-after=345600 -fmodules-prune-interval=86400 -fmodules-validate-once-per-build-session -DDEBUG -ggdb -O0 -DTHEOS_INSTANCE_NAME="\"hook_sysctl\"" -arch armv7 /Users/exchen/tweak/hook_sysctl/.theos/obj/debug/armv7/Tweak.xm.mm -o /Users/exchen/tweak/hook_sysctl/.theos/obj/debug/armv7/Tweak.xm.e864c3a9.o)
==> Compiling Tweak.xm (armv7)…
set -o pipefail; (rm /Users/exchen/tweak/hook_sysctl/.theos/obj/debug/armv7/Tweak.xm.mm)
set -o pipefail; (mkdir -p /Users/exchen/tweak/hook_sysctl/.theos/obj/debug/armv7)
(printf "\e[0;3%im==> \e[1;39m%s…\e[m\n" 3 "Linking tweak hook_sysctl (armv7)"); set -o pipefail; (xcrun -sdk iphoneos clang++ -L/opt/theos/lib -L/opt/theos/vendor/lib -lobjc -framework Foundation -framework CoreFoundation -ObjC++ -fobjc-exceptions -fobjc-call-cxx-cdtors -F/opt/theos/vendor/lib -framework CydiaSubstrate -dynamiclib -install_name "/Library/MobileSubstrate/DynamicLibraries/hook_sysctl.dylib" -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk" -D__IPHONE_OS_VERSION_MIN_REQUIRED=__IPHONE_6_0 -miphoneos-version-min=6.0 -Wl,-segalign,4000 -multiply_defined suppress -arch armv7 -ggdb -O0 -o "/Users/exchen/tweak/hook_sysctl/.theos/obj/debug/armv7/hook_sysctl.dylib" /Users/exchen/tweak/hook_sysctl/.theos/obj/debug/armv7/Tweak.xm.e864c3a9.o | (grep -v 'usr/lib/dylib1.o, missing required architecture' || true))
==> Linking tweak hook_sysctl (armv7)…
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of iOS 7 [-Wdeprecated]
set -o pipefail; (mkdir -p /Users/exchen/tweak/hook_sysctl/.theos/obj/debug/arm64/)
(printf "\e[0;3%im==> \e[1;39m%s…\e[m\n" 1 "Preprocessing Tweak.xm"); set -o pipefail; (/opt/theos/bin/logos.pl -c warnings=error Tweak.xm > /Users/exchen/tweak/hook_sysctl/.theos/obj/debug/arm64/Tweak.xm.mm)
==> Preprocessing Tweak.xm…
(printf "\e[0;3%im==> \e[1;39m%s…\e[m\n" 2 "Compiling Tweak.xm (arm64)"); set -o pipefail; (xcrun -sdk iphoneos clang++ -x objective-c++ -c -I"/Users/exchen/tweak/hook_sysctl" -I/opt/theos/include -I/opt/theos/vendor/include -I/opt/theos/include/_fallback -include /opt/theos/Prefix.pch -DTARGET_IPHONE=1 -O0 -Wall -Werror -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk" -D__IPHONE_OS_VERSION_MIN_REQUIRED=__IPHONE_6_0 -miphoneos-version-min=6.0 -fmodules -fcxx-modules -fmodule-name=hook_sysctl -fbuild-session-file=/Users/exchen/tweak/hook_sysctl/.theos/build_session -fmodules-prune-after=345600 -fmodules-prune-interval=86400 -fmodules-validate-once-per-build-session -DDEBUG -ggdb -O0 -DTHEOS_INSTANCE_NAME="\"hook_sysctl\"" -arch arm64 /Users/exchen/tweak/hook_sysctl/.theos/obj/debug/arm64/Tweak.xm.mm -o /Users/exchen/tweak/hook_sysctl/.theos/obj/debug/arm64/Tweak.xm.c5707656.o)
==> Compiling Tweak.xm (arm64)…
set -o pipefail; (rm /Users/exchen/tweak/hook_sysctl/.theos/obj/debug/arm64/Tweak.xm.mm)
set -o pipefail; (mkdir -p /Users/exchen/tweak/hook_sysctl/.theos/obj/debug/arm64)
(printf "\e[0;3%im==> \e[1;39m%s…\e[m\n" 3 "Linking tweak hook_sysctl (arm64)"); set -o pipefail; (xcrun -sdk iphoneos clang++ -L/opt/theos/lib -L/opt/theos/vendor/lib -lobjc -framework Foundation -framework CoreFoundation -ObjC++ -fobjc-exceptions -fobjc-call-cxx-cdtors -F/opt/theos/vendor/lib -framework CydiaSubstrate -dynamiclib -install_name "/Library/MobileSubstrate/DynamicLibraries/hook_sysctl.dylib" -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk" -D__IPHONE_OS_VERSION_MIN_REQUIRED=__IPHONE_6_0 -miphoneos-version-min=6.0 -multiply_defined suppress -arch arm64 -ggdb -O0 -o "/Users/exchen/tweak/hook_sysctl/.theos/obj/debug/arm64/hook_sysctl.dylib" /Users/exchen/tweak/hook_sysctl/.theos/obj/debug/arm64/Tweak.xm.c5707656.o | (grep -v 'usr/lib/dylib1.o, missing required architecture' || true))
==> Linking tweak hook_sysctl (arm64)…
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of iOS 7 [-Wdeprecated]
(printf "\e[0;3%im==> \e[1;39m%s…\e[m\n" 4 "Merging tweak hook_sysctl"); set -o pipefail; (xcrun lipo -arch armv7 /Users/exchen/tweak/hook_sysctl/.theos/obj/debug/armv7/hook_sysctl.dylib -arch arm64 /Users/exchen/tweak/hook_sysctl/.theos/obj/debug/arm64/hook_sysctl.dylib -create -output "/Users/exchen/tweak/hook_sysctl/.theos/obj/debug/hook_sysctl.dylib.47ba6b93.unsigned")
==> Merging tweak hook_sysctl…
(printf "\e[0;3%im==> \e[1;39m%s…\e[m\n" 4 "Signing hook_sysctl"); set -o pipefail; (CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate" ldid -S "/Users/exchen/tweak/hook_sysctl/.theos/obj/debug/hook_sysctl.dylib.47ba6b93.unsigned" && mv "/Users/exchen/tweak/hook_sysctl/.theos/obj/debug/hook_sysctl.dylib.47ba6b93.unsigned" "/Users/exchen/tweak/hook_sysctl/.theos/obj/debug/hook_sysctl.dylib")
==> Signing hook_sysctl…