From dc507b6ed2f284c7d59bce7c6be4128d235fd733 Mon Sep 17 00:00:00 2001 From: Mirko Galimberti Date: Mon, 12 Feb 2024 19:17:31 +0100 Subject: [PATCH] Remove bitcode support, as is now deprecated by Apple --- kivy_ios/recipes/libffi/__init__.py | 1 - kivy_ios/recipes/python3/__init__.py | 2 +- kivy_ios/recipes/sdl2/__init__.py | 1 - kivy_ios/recipes/sdl2_image/__init__.py | 1 - kivy_ios/recipes/sdl2_mixer/__init__.py | 1 - kivy_ios/recipes/sdl2_ttf/__init__.py | 1 - kivy_ios/toolchain.py | 2 -- kivy_ios/tools/cpplink | 2 -- kivy_ios/tools/liblink | 2 -- 9 files changed, 1 insertion(+), 12 deletions(-) diff --git a/kivy_ios/recipes/libffi/__init__.py b/kivy_ios/recipes/libffi/__init__.py index 12b7c768..504280b2 100644 --- a/kivy_ios/recipes/libffi/__init__.py +++ b/kivy_ios/recipes/libffi/__init__.py @@ -30,7 +30,6 @@ def build_platform(self, plat): shprint(sh.xcodebuild, self.ctx.concurrent_xcodebuild, "ONLY_ACTIVE_ARCH=NO", "ARCHS={}".format(plat.arch), - "BITCODE_GENERATION_MODE=bitcode", "-sdk", plat.sdk, "-project", "libffi.xcodeproj", "-target", "libffi-iOS", diff --git a/kivy_ios/recipes/python3/__init__.py b/kivy_ios/recipes/python3/__init__.py index 4e380810..47e78066 100644 --- a/kivy_ios/recipes/python3/__init__.py +++ b/kivy_ios/recipes/python3/__init__.py @@ -56,7 +56,7 @@ def build_platform(self, plat): shprint(configure, "CC={}".format(build_env["CC"]), "LD={}".format(build_env["LD"]), - "CFLAGS={}".format(build_env["CFLAGS"].replace("-fembed-bitcode", "")), + "CFLAGS={}".format(build_env["CFLAGS"]), "LDFLAGS={} -undefined dynamic_lookup".format(build_env["LDFLAGS"]), "ac_cv_file__dev_ptmx=yes", "ac_cv_file__dev_ptc=no", diff --git a/kivy_ios/recipes/sdl2/__init__.py b/kivy_ios/recipes/sdl2/__init__.py index 2954661a..3e34611d 100644 --- a/kivy_ios/recipes/sdl2/__init__.py +++ b/kivy_ios/recipes/sdl2/__init__.py @@ -24,7 +24,6 @@ def build_platform(self, plat): shprint(sh.xcodebuild, self.ctx.concurrent_xcodebuild, "ONLY_ACTIVE_ARCH=NO", "ARCHS={}".format(plat.arch), - "BITCODE_GENERATION_MODE=bitcode", "CC={}".format(env['CC']), "-sdk", plat.sdk, "-project", "Xcode/SDL/SDL.xcodeproj", diff --git a/kivy_ios/recipes/sdl2_image/__init__.py b/kivy_ios/recipes/sdl2_image/__init__.py index f0f2b0dd..be4c3579 100644 --- a/kivy_ios/recipes/sdl2_image/__init__.py +++ b/kivy_ios/recipes/sdl2_image/__init__.py @@ -15,7 +15,6 @@ def build_platform(self, plat): shprint(sh.xcodebuild, self.ctx.concurrent_xcodebuild, "ONLY_ACTIVE_ARCH=NO", "ARCHS={}".format(plat.arch), - "BITCODE_GENERATION_MODE=bitcode", "HEADER_SEARCH_PATHS={}".format( join(self.ctx.include_dir, "common", "sdl2")), "-sdk", plat.sdk, diff --git a/kivy_ios/recipes/sdl2_mixer/__init__.py b/kivy_ios/recipes/sdl2_mixer/__init__.py index 754a8e21..1b27bdc2 100644 --- a/kivy_ios/recipes/sdl2_mixer/__init__.py +++ b/kivy_ios/recipes/sdl2_mixer/__init__.py @@ -18,7 +18,6 @@ def build_platform(self, plat): shprint(sh.xcodebuild, self.ctx.concurrent_xcodebuild, "ONLY_ACTIVE_ARCH=NO", "ARCHS={}".format(plat.arch), - "BITCODE_GENERATION_MODE=bitcode", "HEADER_SEARCH_PATHS=$HEADER_SEARCH_PATHS /usr/include/machine {} ".format(" ".join(plat.include_dirs)), "-sdk", plat.sdk, "-project", "Xcode/SDL_mixer.xcodeproj", diff --git a/kivy_ios/recipes/sdl2_ttf/__init__.py b/kivy_ios/recipes/sdl2_ttf/__init__.py index fa0352cf..57c2e6c7 100644 --- a/kivy_ios/recipes/sdl2_ttf/__init__.py +++ b/kivy_ios/recipes/sdl2_ttf/__init__.py @@ -14,7 +14,6 @@ def build_platform(self, plat): shprint(sh.xcodebuild, self.ctx.concurrent_xcodebuild, "ONLY_ACTIVE_ARCH=NO", "ARCHS={}".format(plat.arch), - "BITCODE_GENERATION_MODE=bitcode", "GENERATE_MASTER_OBJECT_FILE=YES", "HEADER_SEARCH_PATHS={sdl_include_dir} {libpng_include_dir}".format( sdl_include_dir=join(self.ctx.include_dir, "common", "sdl2"), diff --git a/kivy_ios/toolchain.py b/kivy_ios/toolchain.py index 1fdaee05..cd30b318 100755 --- a/kivy_ios/toolchain.py +++ b/kivy_ios/toolchain.py @@ -250,8 +250,6 @@ def noicctempfile(): "-O3", self.version_min, ] + include_dirs) - if self.sdk == "iphoneos": - env["CFLAGS"] += " -fembed-bitcode" env["LDFLAGS"] = " ".join([ "-arch", self.arch, # "--sysroot", self.sysroot, diff --git a/kivy_ios/tools/cpplink b/kivy_ios/tools/cpplink index 952f2225..e9328e15 100755 --- a/kivy_ios/tools/cpplink +++ b/kivy_ios/tools/cpplink @@ -109,8 +109,6 @@ def call_linker(objects, output): raise ValueError("Unsupported SDK: {}".format(sdk)) call = [ld, '-r', '-o', output + '.o', min_version_flag, '9.0', '-arch', arch] - if min_version_flag == "-ios_version_min": - call += ["-bitcode_bundle"] call += objects print("Linking: {}".format(" ".join(call))) result = subprocess.run(call) diff --git a/kivy_ios/tools/liblink b/kivy_ios/tools/liblink index 494266e8..c48a1456 100755 --- a/kivy_ios/tools/liblink +++ b/kivy_ios/tools/liblink @@ -87,8 +87,6 @@ elif sdk == 'iphonesimulator': else: raise ValueError("Unsupported SDK: {}".format(sdk)) call = [ld, '-r', '-o', output + '.o', min_version_flag, '9.0', '-arch', arch] -if min_version_flag == "-ios_version_min": - call += ["-bitcode_bundle"] call += objects print("Linking: {}".format(" ".join(call))) subprocess.call(call)