8e56a2635f
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).
6 lines
277 B
Bash
6 lines
277 B
Bash
forceLinkCoreFoundationFramework() {
|
|
NIX_CFLAGS_COMPILE="-F@out@/Library/Frameworks${NIX_CFLAGS_COMPILE:+ }${NIX_CFLAGS_COMPILE-}"
|
|
NIX_LDFLAGS+=" @out@/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd"
|
|
}
|
|
|
|
preConfigureHooks+=(forceLinkCoreFoundationFramework)
|