Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable bitcode by default #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/FMake/Framework.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public func xbArchive(
framework: String = "",
platform: Platform = .iPhoneOS,
buildForDistribution: Bool = true,
enableBitCode: Bool = true,
enableBitCode: Bool = false,
excludedArchs: [Platform.Arch] = [],
skipInstall: Bool = false,
env: [String: String]? = nil
Expand Down
8 changes: 2 additions & 6 deletions Sources/FMake/Platform.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public enum Platform: String, CaseIterable {
return ""
}

public func ccFlags(release: Bool = true, arch: Arch, minVersion: String? = nil, bitcode: Bool = true, noCommon: Bool = false, sysroot: Bool = true) -> String {
public func ccFlags(release: Bool = true, arch: Arch, minVersion: String? = nil, bitcode: Bool = false, noCommon: Bool = false, sysroot: Bool = true) -> String {
[
release ? "-O3" : "-g -O0",
bitcode ? "-fembed-bitcode" : "",
Expand All @@ -136,7 +136,7 @@ public enum Platform: String, CaseIterable {
.joined(separator: " ")
}

public func ldFlags(arch: Arch, minVersion: String? = nil, bitcode: Bool = true, syslibroot: Bool = true) -> String {
public func ldFlags(arch: Arch, minVersion: String? = nil, bitcode: Bool = false, syslibroot: Bool = true) -> String {
[
// "-arch \(arch)",
// bitcode ? "-bitcode_bundle" : "",
Expand Down Expand Up @@ -256,10 +256,6 @@ public func appleCMake() -> String {
list(APPEND CMAKE_FIND_ROOT_PATH $ENV{SECOND_FIND_ROOT_PATH})
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")

set(BITCODE "-fembed-bitcode")
set(CMAKE_XCODE_ATTRIBUTE_BITCODE_GENERATION_MODE "bitcode")
set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "YES")

if (NOT $ENV{APPLE_PLATFORM} MATCHES "macosx")
set(UNIX True)
set(APPLE True)
Expand Down