Skip to content

Commit

Permalink
Disable bitcode building for Xcode 14
Browse files Browse the repository at this point in the history
From Apple:

Starting with Xcode 14, bitcode is no longer required for watchOS and
tvOS applications, and the App Store no longer accepts bitcode
submissions from Xcode 14.

Xcode no longer builds bitcode by default and generates a warning message
if a project explicitly enables bitcode: “Building with bitcode is
deprecated. Please update your project and/or target settings to disable
bitcode.” The capability to build with bitcode will be removed in a future
Xcode release. IPAs that contain bitcode will have the bitcode stripped
before being submitted to the App Store. Debug symbols for past bitcode
submissions remain available for download. (86118779)
  • Loading branch information
Benau committed Oct 31, 2022
1 parent a17b16f commit 786e1c6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/apple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ jobs:
rm -rf $HOME/dependencies-${{ steps.sysroot.outputs.lowercase }}-${{ matrix.arch }}/lib/pkgconfig
- name: Build libjpeg-turbo
run: |
# yasm doesn't support -fembed-bitcode
# As jpeg is not performance crticial enough for STK so it's built with asm disabled for non-MacOSX
if [ ${{ matrix.platform }} = "MacOSX" ]; then
sudo apt install -y yasm
Expand Down Expand Up @@ -401,8 +400,8 @@ jobs:
cd src/moltenvk
./fetchDependencies --macos --iossim --tvossim
xcodebuild build -quiet -project MoltenVKPackaging.xcodeproj -scheme "MoltenVK Package (macOS only)" -configuration "Release"
xcodebuild build -quiet -project MoltenVKPackaging.xcodeproj -scheme "MoltenVK Package (iOS only)" -destination "generic/platform=iOS Simulator" -configuration "Release" OTHER_CFLAGS="-fembed-bitcode" BITCODE_GENERATION_MODE="bitcode"
xcodebuild build -quiet -project "MoltenVKPackaging.xcodeproj" -scheme "MoltenVK Package (tvOS only)" -destination "generic/platform=tvOS Simulator" -configuration "Release" OTHER_CFLAGS="-fembed-bitcode" BITCODE_GENERATION_MODE="bitcode"
xcodebuild build -quiet -project MoltenVKPackaging.xcodeproj -scheme "MoltenVK Package (iOS only)" -destination "generic/platform=iOS Simulator" -configuration "Release"
xcodebuild build -quiet -project "MoltenVKPackaging.xcodeproj" -scheme "MoltenVK Package (tvOS only)" -destination "generic/platform=tvOS Simulator" -configuration "Release"
touch -r README.md Package/Release/MoltenVK/include/MoltenVK/*
touch -r README.md Package/Release/MoltenVK/include/vk_video/*
touch -r README.md Package/Release/MoltenVK/include/vulkan/*
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ jobs:
run: |
cd src/moltenvk
./fetchDependencies --ios
xcodebuild build -quiet -project MoltenVKPackaging.xcodeproj -scheme "MoltenVK Package (iOS only)" -configuration "Release" OTHER_CFLAGS="-fembed-bitcode" BITCODE_GENERATION_MODE="bitcode"
xcodebuild build -quiet -project MoltenVKPackaging.xcodeproj -scheme "MoltenVK Package (iOS only)" -configuration "Release"
touch -r README.md Package/Release/MoltenVK/include/MoltenVK/*
touch -r README.md Package/Release/MoltenVK/include/vk_video/*
touch -r README.md Package/Release/MoltenVK/include/vulkan/*
Expand All @@ -269,7 +269,7 @@ jobs:
run: |
cd src/moltenvk
./fetchDependencies --tvos
xcodebuild build -quiet -project "MoltenVKPackaging.xcodeproj" -scheme "MoltenVK Package (tvOS only)" -configuration "Release" OTHER_CFLAGS="-fembed-bitcode" BITCODE_GENERATION_MODE="bitcode"
xcodebuild build -quiet -project "MoltenVKPackaging.xcodeproj" -scheme "MoltenVK Package (tvOS only)" -configuration "Release"
touch -r README.md Package/Release/MoltenVK/include/MoltenVK/*
touch -r README.md Package/Release/MoltenVK/include/vk_video/*
touch -r README.md Package/Release/MoltenVK/include/vulkan/*
Expand Down
5 changes: 0 additions & 5 deletions cmake/Toolchain-cctools.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ else()
set(CLANG_ARCH ${CCTOOLS_ARCH})
endif()

if (NOT CCTOOLS_PLATFORM MATCHES MacOSX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fembed-bitcode")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fembed-bitcode")
endif()

SET(CMAKE_C_COMPILER ${CCTOOLS_PREFIX}/bin/${CCTOOLS_ARCH}-${platform_lower}-clang)
SET(CMAKE_CXX_COMPILER ${CCTOOLS_PREFIX}/bin/${CCTOOLS_ARCH}-${platform_lower}-clang++)
SET(CMAKE_RANLIB ${CCTOOLS_PREFIX}/bin/${CLANG_ARCH}-apple-darwin11-ranlib)
Expand Down
4 changes: 0 additions & 4 deletions cmake/Toolchain-ios.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ set(CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ")
set(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
set(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")

# For archive
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fembed-bitcode")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fembed-bitcode")

if(IOS_SYSROOT MATCHES iphoneos)
set(IOS TRUE CACHE BOOL "")
set(CMAKE_SYSTEM_NAME iOS CACHE INTERNAL "" FORCE)
Expand Down

0 comments on commit 786e1c6

Please sign in to comment.