bintools-wrapper: ensure roles are set before mangling variables

+9
+9
pkgs/build-support/bintools-wrapper/add-darwin-ldflags-before.sh
··· 21 haveDarwinSDKVersion= 22 haveDarwinPlatformVersion= 23 24 mangleVarSingle @darwinMinVersionVariable@ ${role_suffixes[@]+"${role_suffixes[@]}"} 25 26 n=0
··· 21 haveDarwinSDKVersion= 22 haveDarwinPlatformVersion= 23 24 + # Roles will set by add-flags.sh, but add-flags.sh can be skipped when the 25 + # cc-wrapper has added the linker flags. Both the cc-wrapper and the binutils 26 + # wrapper mangle the same variable (MACOSX_DEPLOYMENT_TARGET), so if roles are 27 + # empty due to being run through the cc-wrapper then the mangle here is a no-op 28 + # and we still do the right thing. 29 + # 30 + # To be robust, make sure we always have the correct set of roles. 31 + accumulateRoles 32 + 33 mangleVarSingle @darwinMinVersionVariable@ ${role_suffixes[@]+"${role_suffixes[@]}"} 34 35 n=0