Toolchain question about architectures

I need to understand what part of HXCPP / Lime / OpenFL is in charge of building the following command line for native targets (in this example it’s tvOS, but might as well be anything else)

xcrun --sdk appletvos9.0 clang++ -Iinclude -c -stdlib=libc++ -g -arch arm64 -isysroot /Applications/ -mappletvos-version-min=9.0 -fobjc-arc -DOBJC_ARC -Wno-parentheses -Wno-null-dereference -Wno-unused-value -Wno-bool-conversion -fno-stack-protector -DAPPLETV=APPLETV -DAPPLETVOS=APPLETVOS -fembed-bitcode -DENABLE_BITCODE=YES -DHXCPP_DEBUG -DSTATIC_LINK -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS -DHXCPP_API_LEVEL=321 -I/Users/tanis/Documents/hxcpp/include -fexceptions -fstrict-aliasing -x c++ -Wno-invalid-offsetof ./src/openfl/display/IGraphicsData.cpp -o/Users/tanis/Documents/openfl-test-tvos/BunnyMarkLatest/Export/tvos/BunnyMark/haxe/build/Debug-appletvos-64/obj/appletvos-c11-dbg-64/bd21d9ff_IGraphicsData.o

As you can see, it’s being passed -arch [architecture] and -isysroot [path to the SDK.
For some reason I cannot get the tvOS platform to set the architecture and sysroot for the simulator. Any clue of where that code should go?


The compile flag arguments are handled by HXCPP, as well as the toolchain XML files configured with HXCPP.

One exception with iOS (and tvOS I assume, in this case) is that the compile process uses a build makefile to go with Xcode, which is unusual, as it is not how HXCPP is normally called. Some times, there are specific issues to this target due to this difference (such as which defines are passed) but in general you’ll want to look at the toolchain XML file. Some targets (like iOS) have a separate XML for the simulator, but others (like Tizen and BlackBerry I think) just have defines within the same common toolchain XML to specify the differences :slight_smile:

Thanks for the explanation @singmajesty! Right now I can’t figure out if I made a mistake somewhere and the appletvsim-toolchain.xml is not being used at all or if there’s something in that XML file that doesn’t work correctly.

You could always add to the XML and see if it shows in the compile log, something like that, to know which toolchain file is used :smile:

I think that -verbose may tell you, though, when it starts compiling, which platform it detects, and which toolchain it uses?