And then add a new post_package function to allow for lipo combination or other post-processing before it's packaged up. This could be done by adding a new property variants at a toplevel of the conanfile and then set self.current_variant or something like that between each run. run combination method that runs lipo on all the artifacts collected in package function.run package function (to copy all lib headers etc).Just spitballing here, but the "perfect" setup would actually be if conan could do the following: Ideally we would be able to have one build dir per arch - that would solve that. how to clean out the source directory so that nothing is left to break the next build. how to save away the binaries between each build phase to have them easily available for the lipo step.I think the tricky parts are the following: I am very interested in this considering I was pestering about this the other day. if asked for x86 arch, what to install, x86 or x86+圆4 package? probably issues with conflict resolution may appear - e.g.new conan command will be too OS-specific which might be not good (or useless for other arches?).some convention on how to identify and describe combined packages shall be developed.anyway, conan somehow needs to know which binaries to process and where are they located (but in worst case, conan still can wildcard *so *a *dylib).while binaries are in general easy to handle, headers might be tricky part if they are different for different arches (in my practice I just copy headers from sources, but some headers might be generated from the build process and contain definitions like SIZE_OF_VOIDP).probably this approach ends up in some new conan command line, like "conan combine" or "conan lipo" which will run lipo for all libraries from packages to be combined. Windows tools which may run on both x86 and 圆4, but not on ARM might have combined x86+圆4 indication). I am not sure if it's even possible now to have some approach for conan package to support multiple settings at the same time, but probably there are more use cases for such combined packages (e.g. The idea is to build conan packages for each architecture (armv7, arm64, etc) as usual and then somehow combine them into aggregated multi-architecture conan package. build N conan packages for each architecture and then combine them somehow.package "arch" setting is no longer showing the truth, moreover, it's confusing field in case of universal binaries.lots of code copy-pasted from package to package for universal binaries handling.conanfile has very special path for iOS and Macos, although build process is same as for other NIX* platforms.There are few disadvantages of such approach: Self.build_with_configure(arch, "iphoneos") typical conan file may look like:Īrches =
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |