Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

support for XCode8 #38

Open
wants to merge 3 commits into
base: master
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
11 changes: 11 additions & 0 deletions .idea/curl-ios-build-scripts.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

287 changes: 287 additions & 0 deletions .idea/workspace.xml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions lib/curl_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ module CurlBuilder
verbose: false,
debug_symbols: false,
curldebug: false,
sdk_version: "9.3",
osx_sdk_version: "10.11",
libcurl_version: "7.49.1",
sdk_version: "11.2",
osx_sdk_version: "10.13",
libcurl_version: "7.57.0",
architectures: %w(i386 armv7 armv7s arm64 x86_64),
xcode_home: "/Applications/Xcode.app/Contents/Developer",
run_on_dir: Dir::pwd,
Expand Down
10 changes: 5 additions & 5 deletions lib/curl_builder/compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def platform_for(architecture)

def tools_for(platform)
{
cc: find_tool("gcc", platform),
cc: find_tool("clang", platform),
ld: find_tool("ld", platform),
ar: find_tool("ar", platform),
as: find_tool("as", platform),
Expand Down Expand Up @@ -96,18 +96,18 @@ def compilation_flags_for(platform, architecture)
version = "6.0"
min_version = "-miphoneos-version-min=#{version}"
elsif platform == "iPhoneOS"
version = architecture == "arm64" ? "6.0" : "5.0"
version = architecture == "arm64" ? "7.0" : "6.0"
min_version = "-miphoneos-version-min=#{version}"
else
min_version = "-mmacosx-version-min=10.7"
min_version = "-mmacosx-version-min=10.8"
end

sdk_version = sdk_version_for platform
sdk = "#{setup(:xcode_home)}/Platforms/#{platform}.platform/Developer/SDKs/#{platform}#{sdk_version}.sdk"

{
ldflags: "-arch #{architecture} -pipe -isysroot #{sdk}",
cflags: "-arch #{architecture} -pipe -isysroot #{sdk} #{min_version}"
ldflags: "-arch #{architecture} -isysroot #{sdk}",
cflags: "-arch #{architecture} -pipe -Os -gdwarf-2 -isysroot #{sdk} #{min_version} -fembed-bitcode -Werror=partial-availability"
}
end

Expand Down
3 changes: 2 additions & 1 deletion lib/curl_builder/packer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def pack(compiled_architectures)
info { "Packing binaries for architectures '#{param(compiled_architectures.join(" "))}'..." }

osx = setup(:osx_sdk_version) != "none" ? compiled_architectures.select { |arch| arch.match(/^x86_64/) } : []
ios = compiled_architectures - osx
ios = compiled_architectures
arm = ios.select { |arch| arch.match(/^arm/) }
arm64 = ios.select { |arch| arch.match(/^arm64/) }

Expand All @@ -33,6 +33,7 @@ def pack(compiled_architectures)
end

if create_binary_for ios, "ios-dev"
# Fix: now iPhone simulator may also use x86_64
successful["ios-dev"] = ios
copy_include_dir ios.first, "ios-dev"
end
Expand Down