iOS: Resolve location of crt.o at build time, not qmake time
By referring to crt.o by $(SDK) we allow Xcode to switch between the iPhoneSimulator and the iPhoneOS SDKs. Change-Id: I33d9f30b2f5a8f085dc4ddfc6e2ef228d02d639c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
This commit is contained in:
parent
6cdd9928ab
commit
98c204a486
@ -27,13 +27,9 @@ equals(TEMPLATE, app):contains(QT, gui(-private)?) {
|
|||||||
# get rid of this step completely and just pass -e _qtmn to the
|
# get rid of this step completely and just pass -e _qtmn to the
|
||||||
# linker, taking advantage of the new LC_MAIN load command.
|
# linker, taking advantage of the new LC_MAIN load command.
|
||||||
|
|
||||||
# We use xcodebuild to resolve the location of the crt1 object file
|
# We know that iOS 3.1 and up uses crt1.3.1.o (technically not
|
||||||
# as we know that it lives in the same location as the c library.
|
|
||||||
c_library_path = $$system("/usr/bin/xcodebuild -sdk $$QMAKE_MAC_SDK -find-library c 2>/dev/null")
|
|
||||||
|
|
||||||
# We also know that iOS 3.1 and up uses crt1.3.1.o (technically not
|
|
||||||
# true for simulator, but the SDK has a symlink to the correct file).
|
# true for simulator, but the SDK has a symlink to the correct file).
|
||||||
original_crt_path = $$dirname(c_library_path)/crt1.3.1.o
|
original_crt_path = "$(SDK_DIR)/usr/lib/crt1.3.1.o"
|
||||||
|
|
||||||
xcode_objects_path = "$(OBJECT_FILE_DIR_$(CURRENT_VARIANT))/$(CURRENT_ARCH)"
|
xcode_objects_path = "$(OBJECT_FILE_DIR_$(CURRENT_VARIANT))/$(CURRENT_ARCH)"
|
||||||
custom_crt_filename = "crt1_qt.o"
|
custom_crt_filename = "crt1_qt.o"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user