Skip to content

Commit

Permalink
jeffhostetler/native-curl (git#636)
Browse files Browse the repository at this point in the history
Use the OS provided version of `libcurl` when building release packages.
This is in contrast to using Homebrew on ARM64 in our universal
binaries.

Also add diagnostics during the release build process to display the
DYLIBs
that are referenced by the key executables.
  • Loading branch information
jeffhostetler committed Mar 26, 2024
2 parents 00bb8b3 + 1e44a0f commit 105fa1d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
14 changes: 14 additions & 0 deletions .github/macos-installer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,20 @@ $(BUILD_DIR)/git-$(VERSION)/osx-built-keychain:
$(BUILD_DIR)/git-$(VERSION)/osx-built:
[ -d $(DESTDIR)$(GIT_PREFIX) ] && $(SUDO) rm -rf $(DESTDIR) || echo ok
cd $(BUILD_DIR)/git-$(VERSION); $(SUBMAKE) -j $(CORES) all strip
echo "================"
echo "Dumping Linkage"
cd $(BUILD_DIR)/git-$(VERSION); ./git version
echo "===="
cd $(BUILD_DIR)/git-$(VERSION); /usr/bin/otool -L ./git
echo "===="
cd $(BUILD_DIR)/git-$(VERSION); /usr/bin/otool -L ./git-http-fetch
echo "===="
cd $(BUILD_DIR)/git-$(VERSION); /usr/bin/otool -L ./git-http-push
echo "===="
cd $(BUILD_DIR)/git-$(VERSION); /usr/bin/otool -L ./git-remote-http
echo "===="
cd $(BUILD_DIR)/git-$(VERSION); /usr/bin/otool -L ./git-gvfs-helper
echo "================"
touch $@

$(BUILD_DIR)/git-$(VERSION)/osx-installed-bin: $(BUILD_DIR)/git-$(VERSION)/osx-built $(BUILD_DIR)/git-$(VERSION)/osx-built-keychain
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/build-git-installers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,15 +325,14 @@ jobs:
# Install x86_64 packages
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
arch -x86_64 /usr/local/bin/brew install gettext curl
arch -x86_64 /usr/local/bin/brew install gettext
# Install arm64 packages
brew install automake asciidoc xmlto docbook
brew link --force gettext
# Make universal gettext and curl library
# Make universal gettext library
lipo -create -output libintl.a /usr/local/opt/gettext/lib/libintl.a /opt/homebrew/opt/gettext/lib/libintl.a
lipo -create -output libcurl.dylib /opt/homebrew/opt/curl/lib/libcurl.4.dylib /usr/local/opt/curl/lib/libcurl.4.dylib
- name: Set up signing/notarization infrastructure
env:
Expand Down Expand Up @@ -412,9 +411,9 @@ jobs:
LDFLAGS = -L"$(pwd)"
EOF
# Configure the Git build to pick up the universal `libcurl.dylib`
# Configure the Git to use the OS supplied libcurl.
cat >>git/config.mak <<EOF
CURL_LDFLAGS := -L"$(pwd)" -lcurl
CURL_LDFLAGS := -lcurl
CURL_CONFIG := /usr/bin/true
EOF
Expand Down

0 comments on commit 105fa1d

Please sign in to comment.