]> granicus.if.org Git - gc/commit
Harmonize OSX/iOS configuration; enable compiling for iPhone simulator
authorJoao Abecasis <joao@abecasis.name>
Wed, 27 May 2015 12:26:12 +0000 (14:26 +0200)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 28 Jun 2015 08:03:46 +0000 (11:03 +0300)
commit8d4fc8d7d0383551aec5bf9b5ad429dc372d3bb4
tree86af6c8cf6cbe44a74f06233601a3b04a8ec22f8
parentcb373bbcefa1704c95a6273a08b5fe18747e9196
Harmonize OSX/iOS configuration; enable compiling for iPhone simulator

Darwin setup would assume i386/x86_64 was OS X, while arm/arm64 was iOS.
The iPhone simulator, however, breaks this assumption, covering both
i386 and x86_64 (depending on the simulated device).
With this patch <TargetConditionals.h> is pulled in and TARGET_OS_IPHONE
used to detect an iOS target -- both device and simulator.
Otherwise, #defines were moved to keep Darwin setup similar across
i386/x86_64/arm/arm64, making GC_DONT_REGISTER_MAIN_STATIC_DATA and
TARGET_OS_IPHONE options respected across the board.
(Apart from the added #include, Darwin on PowerPC is left as it was.)

* include/private/gcconfig.h: Include TargetConditionals.h (if DARWIN).
* include/private/gcconfig.h (DARWIN_DONT_PARSE_STACK): Move definition
to the place of OS_TYPE definition.
* include/private/gcconfig.h (DYNAMIC_LOADING): Define only if
GC_DONT_REGISTER_MAIN_STATIC_DATA (only if DARWIN).
* include/private/gcconfig.h (NO_DYLD_BIND_FULLY_IMAGE): Define only if
TARGET_OS_IPHONE != 0 (including simulator case).
include/private/gcconfig.h