This pull request enables bitcode for all Python 3.6 builds and supporting libs. It further focuses on enabling numpy 1.16.3 on iOS and was tested on actual devices and the simulator.
Trivia
enabling bitcode for iOS projects is default, but not mandatory.
when the according XCode setting is enabled, the given python + numpy builds will not run on actual devices (simulator works, though)
when the fembed-bitcode flag is set, the given build process breaks
linker flags such as dyanmic_lookup and bundle won't work anymore
environment variable LDSHARED used to further control cython numpy-build and linking
linker flag -undefined dyanmic_lookup disabled: environment variable LDLIB was introduced to further control cython numpy-build and linking. Numpy was patched to recognize this non-std. variable. Std. variables (LD_LIBRARY_PATH and others) were not recognized by build script.
linker flag -undefined dyanmic_lookup disabled: numpy was patched to name necessary libs.
numpy random module was patched to circumvent runtime error that tries an local include of mtrand
linker flag - bundle substituted with bitcode compatible flag -r.
numpy startup/inclusion method was altered, due to merge of multiarray and umath (see README.rst)
This pull request enables bitcode for all Python 3.6 builds and supporting libs. It further focuses on enabling numpy 1.16.3 on iOS and was tested on actual devices and the simulator.
Trivia
dyanmic_lookup
andbundle
won't work anymoreApproach
-fembed-bitcode
was enabled for all iOS buildsLDSHARED
used to further control cython numpy-build and linking-undefined dyanmic_lookup
disabled: environment variable LDLIB was introduced to further control cython numpy-build and linking. Numpy was patched to recognize this non-std. variable. Std. variables (LD_LIBRARY_PATH
and others) were not recognized by build script.-undefined dyanmic_lookup
disabled: numpy was patched to name necessary libs.- bundle
substituted with bitcode compatible flag-r
.dist/{iOS/tvOS/watchOS}/app_packages/numpy
introducedTodo
-Wall
compile flag hereFor our build the following platforms were selected (
makefile
)