Skip to content

Commit 550ec75

Browse files
jeffhostetlerdscho
authored andcommitted
jeffhostetler/native-curl (#636)
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.
2 parents 6afd40a + 3b72420 commit 550ec75

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

.github/macos-installer/Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,20 @@ $(BUILD_DIR)/git-$(VERSION)/osx-built-keychain:
4545
$(BUILD_DIR)/git-$(VERSION)/osx-built:
4646
[ -d $(DESTDIR)$(GIT_PREFIX) ] && $(SUDO) rm -rf $(DESTDIR) || echo ok
4747
cd $(BUILD_DIR)/git-$(VERSION); $(SUBMAKE) -j $(CORES) all strip
48+
echo "================"
49+
echo "Dumping Linkage"
50+
cd $(BUILD_DIR)/git-$(VERSION); ./git version
51+
echo "===="
52+
cd $(BUILD_DIR)/git-$(VERSION); /usr/bin/otool -L ./git
53+
echo "===="
54+
cd $(BUILD_DIR)/git-$(VERSION); /usr/bin/otool -L ./git-http-fetch
55+
echo "===="
56+
cd $(BUILD_DIR)/git-$(VERSION); /usr/bin/otool -L ./git-http-push
57+
echo "===="
58+
cd $(BUILD_DIR)/git-$(VERSION); /usr/bin/otool -L ./git-remote-http
59+
echo "===="
60+
cd $(BUILD_DIR)/git-$(VERSION); /usr/bin/otool -L ./git-gvfs-helper
61+
echo "================"
4862
touch $@
4963

5064
$(BUILD_DIR)/git-$(VERSION)/osx-installed-bin: $(BUILD_DIR)/git-$(VERSION)/osx-built $(BUILD_DIR)/git-$(VERSION)/osx-built-keychain

.github/workflows/build-git-installers.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -325,15 +325,14 @@ jobs:
325325
326326
# Install x86_64 packages
327327
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
328-
arch -x86_64 /usr/local/bin/brew install gettext curl
328+
arch -x86_64 /usr/local/bin/brew install gettext
329329
330330
# Install arm64 packages
331331
brew install automake asciidoc xmlto docbook
332332
brew link --force gettext
333333
334-
# Make universal gettext and curl library
334+
# Make universal gettext library
335335
lipo -create -output libintl.a /usr/local/opt/gettext/lib/libintl.a /opt/homebrew/opt/gettext/lib/libintl.a
336-
lipo -create -output libcurl.dylib /opt/homebrew/opt/curl/lib/libcurl.4.dylib /usr/local/opt/curl/lib/libcurl.4.dylib
337336
338337
- name: Set up signing/notarization infrastructure
339338
env:
@@ -412,9 +411,9 @@ jobs:
412411
LDFLAGS = -L"$(pwd)"
413412
EOF
414413
415-
# Configure the Git build to pick up the universal `libcurl.dylib`
414+
# Configure the Git to use the OS supplied libcurl.
416415
cat >>git/config.mak <<EOF
417-
CURL_LDFLAGS := -L"$(pwd)" -lcurl
416+
CURL_LDFLAGS := -lcurl
418417
CURL_CONFIG := /usr/bin/true
419418
EOF
420419

0 commit comments

Comments
 (0)