apple-sdk setup hooks: NIX_CFLAGS_COMPILE may be undefined

This commit is contained in:
John Ericson 2019-11-07 17:17:41 -05:00
parent 6fb526b32c
commit f1481f2c90
2 changed files with 2 additions and 2 deletions

View file

@ -1,5 +1,5 @@
linkSystemCoreFoundationFramework() {
NIX_CFLAGS_COMPILE="-F@out@/Library/Frameworks $NIX_CFLAGS_COMPILE"
NIX_CFLAGS_COMPILE="-F@out@/Library/Frameworks${NIX_CFLAGS_COMPILE:+ }${NIX_CFLAGS_COMPILE-}"
# gross! many symbols (such as _OBJC_CLASS_$_NSArray) are defined in system CF, but not
# in the opensource release
# if the package needs private headers, we assume they also want to link with system CF

View file

@ -2,7 +2,7 @@ noDeprecatedDeclarations() {
# Security.framework has about 2000 deprecated constants, all of which the user will be
# warned about at compilation time
flag="-Wno-deprecated-declarations"
if [[ "$NIX_CFLAGS_COMPILE" != *$flag* ]]; then
if [[ "${NIX_CFLAGS_COMPILE-}" != *$flag* ]]; then
NIX_CFLAGS_COMPILE+=" $flag"
fi
}