From 8e56a2635fe3fe31a03f0d60d90cb476ddb8619c Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sat, 12 Aug 2023 09:11:05 -0400 Subject: CoreFoundation: specify the tbd explicitly The current hook specifies the path to the framework library, but nixpkgs does not actually provide the library when linking against the system framework. It provides a text-based stub (`.tbd`) instead. ld64 will find the stub and use it, but lld will not when the full path is specified. Both linkers work if the extension is included, so do that for compatibility with both. This fixes using lld with CoreFoundation (e.g., to support LTO on Darwin). --- pkgs/os-specific/darwin/apple-sdk-11.0/cf-setup-hook.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs/os-specific/darwin/apple-sdk-11.0/cf-setup-hook.sh') diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/cf-setup-hook.sh b/pkgs/os-specific/darwin/apple-sdk-11.0/cf-setup-hook.sh index 3b08c51d196..b64eb95f2de 100644 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/cf-setup-hook.sh +++ b/pkgs/os-specific/darwin/apple-sdk-11.0/cf-setup-hook.sh @@ -1,6 +1,6 @@ forceLinkCoreFoundationFramework() { NIX_CFLAGS_COMPILE="-F@out@/Library/Frameworks${NIX_CFLAGS_COMPILE:+ }${NIX_CFLAGS_COMPILE-}" - NIX_LDFLAGS+=" @out@/Library/Frameworks/CoreFoundation.framework/CoreFoundation" + NIX_LDFLAGS+=" @out@/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd" } preConfigureHooks+=(forceLinkCoreFoundationFramework) -- cgit 1.4.1