Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions toolchain/finish-setup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@



<set name="LIBEXTRA" value=".iphonesim-64" if="iphonesim"/>
<set name="LIBEXTRA" value=".iphonesim" if="iphonesim" unless="HXCPP_M64"/>
<set name="LIBEXTRA" value=".iphonesim-64" if="iphonesim" unless="HXCPP_ARM64"/>
<set name="LIBEXTRA" value=".iphonesim-arm64" if="iphonesim HXCPP_ARM64"/>
<set name="LIBEXTRA" value=".iphonesim" if="iphonesim" unless="HXCPP_M64 || HXCPP_ARM64"/>
<section if="iphoneos">
<set name="LIBEXTRA" value=".iphoneos-v7" if="HXCPP_ARMV7"/>
<set name="LIBEXTRA" value=".iphoneos-v7s" if="HXCPP_ARMV7S"/>
Expand Down
36 changes: 23 additions & 13 deletions toolchain/iphonesim-toolchain.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,24 @@
<mmflag value="-fobjc-abi-version=2"/>
<mmflag value="-fobjc-legacy-dispatch"/>
<flag value="-Wno-unused-variable"/>
<flag value="-arch"/>
<flag value="i386" unless="HXCPP_M64"/>
<flag value="x86_64" if="HXCPP_M64"/>
<flag value="-isysroot"/>
<flag value="${DEVELOPER_DIR}/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator${IPHONE_VER}.sdk"/>
<!-- Removed for iOS 8 -->
<!-- <flag value="-fvisibility=hidden"/> -->
<!-- <flag value="-miphoneos-version-min=${IPHONE_VER}"/> -->
<flag value="-miphoneos-version-min=9.0" unless="HXCPP_IOS_MIN_VERSION" />
<flag value="-miphoneos-version-min=${HXCPP_IOS_MIN_VERSION}" if="HXCPP_IOS_MIN_VERSION" />
<!-- ARM64 simulator (Apple Silicon): use -target for correct LC_BUILD_VERSION platform -->
<section if="HXCPP_ARM64">
<flag value="-target"/>
<flag value="arm64-apple-ios12.0-simulator" unless="HXCPP_IOS_MIN_VERSION"/>
<flag value="arm64-apple-ios${HXCPP_IOS_MIN_VERSION}-simulator" if="HXCPP_IOS_MIN_VERSION"/>
<flag value="-isysroot"/>
<flag value="${DEVELOPER_DIR}/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator${IPHONE_VER}.sdk"/>
</section>
<!-- x86_64/i386 simulator: original flags -->
<section unless="HXCPP_ARM64">
<flag value="-arch"/>
<flag value="i386" unless="HXCPP_M64"/>
<flag value="x86_64" if="HXCPP_M64"/>
<flag value="-isysroot"/>
<flag value="${DEVELOPER_DIR}/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator${IPHONE_VER}.sdk"/>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could the -isysroot part be extracted outside the sections since it seems to be common to both?

<flag value="-mios-simulator-version-min=9.0" unless="HXCPP_IOS_MIN_VERSION" />
<flag value="-mios-simulator-version-min=${HXCPP_IOS_MIN_VERSION}" if="HXCPP_IOS_MIN_VERSION" />
</section>
<flag value="-DIPHONE=IPHONE"/>
<flag value="-DIPHONESIM=IPHONESIM"/>
<flag value="-fobjc-arc" if="OBJC_ARC" />
Expand All @@ -69,16 +77,18 @@

<outflag value="-o"/>
<ext value=".o"/>
<objdir value="obj/iphonesim${OBJGCC}${OBJDBG}/" />
<objdir value="obj/iphonesim${OBJGCC}${OBJDBG}-64/" if="HXCPP_ARM64" />
<objdir value="obj/iphonesim${OBJGCC}${OBJDBG}/" unless="HXCPP_ARM64" />
</compiler>

<linker id="dll" exe="g++" >
<exe name="xcrun --sdk iphonesimulator${IPHONE_VER} g++" if="HXCPP_GCC" />
<exe name="xcrun --sdk iphonesimulator${IPHONE_VER} clang++" />
<flag value="-dynamiclib"/>
<flag value="-arch"/>
<flag value="i386" unless="HXCPP_M64"/>
<flag value="x86_64" if="HXCPP_M64"/>
<flag value="i386" unless="HXCPP_M64 || HXCPP_ARM64"/>
<flag value="x86_64" if="HXCPP_M64" unless="HXCPP_ARM64"/>
<flag value="arm64" if="HXCPP_ARM64"/>
<flag value="-isysroot"/>
<flag value="${DEVELOPER_DIR}/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator${IPHONE_VER}.sdk"/>
<flag value="-Wl,-undefined,dynamic_lookup"/>
Expand Down