| 9 Nov 2025 |
samasaur | is the backdeploy even useful if we don't support older versions? | 04:58:25 |
samasaur | hmm even with COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_OSX set it's still passing -target arm64-apple-macosx10.9 | 05:12:32 |
Randy Eckenrode | It should be NIX_CFLAGS_COMPILE. | 05:13:36 |
Randy Eckenrode | e.g., https://github.com/NixOS/nixpkgs/blob/staging-next/pkgs/by-name/mo/moltenvk/package.nix#L102 | 05:15:57 |
Randy Eckenrode | * | 05:16:26 |
samasaur | could have sworn there was a cxx version as well... | 05:33:34 |
samasaur | regardless setting the correct variable has made it past where the build failed originally | 05:33:51 |
samasaur | we'll see if this succeeds | 05:34:09 |
samasaur | sigh | 05:38:53 |
samasaur | okay that fails because NIX_CFLAGS_COMPILE apparently applies to Swift as well, which results in error: unknown argument: '-Werror=unguarded-availability' when it tries to build the swift module Basic | 05:39:50 |
samasaur | at least I assume the error is coming from swift | 05:40:59 |
samasaur | the bootstrap swiftc | 05:41:07 |
samasaur | I just see
swift> [1160/1373] Building swift module Basic
swift> FAILED: bootstrapping1/SwiftCompilerSources/Basic.o /private/tmp/nix-build-swift-5.10.1.drv-10/build/swift/bootstrapping1/SwiftCompilerSources/Basic.o
swift> cd /private/tmp/nix-build-swift-5.10.1.drv-10/src/swift/SwiftCompilerSources && /private/tmp/nix-build-swift-5.10.1.drv-10/build/swift/bootstrapping0/bin/swiftc -c -o /private/tmp/nix-build-swift-5.10.1.drv-10/build/swift/bootstrapping1/SwiftCompilerSources/Basic.o -sdk /nix/store/rrjy7x4jpxp92gs1prpbg79ng0mcl5hj-apple-sdk-14.4/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk -I /private/tmp/nix-build-swift-5.10.1.drv-10/build/swift/bootstrapping0/bin/../lib -I /nix/store/rrjy7x4jpxp92gs1prpbg79ng0mcl5hj-apple-sdk-14.4/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/lib -target arm64-apple-macosx14.0 -module-name Basic -emit-module -emit-module-path /private/tmp/nix-build-swift-5.10.1.drv-10/build/swift/bootstrapping1/SwiftCompilerSources/Basic.swiftmodule -parse-as-library /private/tmp/nix-build-swift-5.10.1.drv-10/src/swift/SwiftCompilerSources/Sources/Basic/SourceLoc.swift /private/tmp/nix-build-swift-5.10.1.drv-10/src/swift/SwiftCompilerSources/Sources/Basic/Utils.swift -wmo -Xfrontend -validate-tbd-against-ir=none -Xfrontend -enable-experimental-cxx-interop -Xcc -std=c++17 -Xcc -UIBOutlet -Xcc -UIBAction -Xcc -UIBInspectable -Xfrontend -disable-implicit-string-processing-module-import -O -cross-module-optimization -Xcc -DNDEBUG -Xcc -I -Xcc /private/tmp/nix-build-swift-5.10.1.drv-10/src/llvm-project/llvm/include -Xcc -I -Xcc /private/tmp/nix-build-swift-5.10.1.drv-10/build/llvm/include -Xcc -I -Xcc /private/tmp/nix-build-swift-5.10.1.drv-10/src/llvm-project/clang/include -Xcc -I -Xcc /private/tmp/nix-build-swift-5.10.1.drv-10/build/llvm/tools/clang/include -Xcc -I -Xcc /private/tmp/nix-build-swift-5.10.1.drv-10/src/swift/include -Xcc -I -Xcc /private/tmp/nix-build-swift-5.10.1.drv-10/build/swift/SwiftCompilerSources/../include -I /private/tmp/nix-build-swift-5.10.1.drv-10/build/swift/bootstrapping1/SwiftCompilerSources
swift> Warning: supplying the --target arm64-apple-macosx14.0 != arm64-apple-darwin argument to a nix-wrapped compiler may not work correctly - cc-wrapper is currently not designed with multi-target compilers in mind. You may want to use an un-wrapped compiler instead.
swift> <unknown>:0: error: unknown argument: '-Werror=unguarded-availability'
| 05:41:36 |
samasaur | hm | 05:43:47 |
samasaur | okay even running swiftc --help using that bootstrap compiler produces the unknown argument error | 05:44:26 |
samasaur | because it's wrapped and it's passing -Werror=unguarded-availability directly to swift-frontend-unwrapped | 05:45:50 |
samasaur | ah | 05:47:41 |
samasaur | well | 05:47:41 |
samasaur | found out why! | 05:47:43 |
samasaur | swift-wrapper has this in it:
# TODO: If we ever need to expand functionality of this hook, it may no longer
# be compatible with Swift. Right now, it is only used on Darwin to force
# -target, which also happens to work with Swift.
if [[ -e $cc_wrapper/nix-support/add-local-cc-cflags-before.sh ]]; then
source $cc_wrapper/nix-support/add-local-cc-cflags-before.sh
fi
| 05:48:16 |
samasaur | but the -Werror=unguarded-availability flag was added in add-local-cc-cflags-before.sh | 05:48:53 |
samasaur | so it now does not work with swift | 05:49:02 |
samasaur | I'm not sure what the best approach here is | 05:52:45 |
samasaur | I can add some CC_WRAPPER_USED_FOR_SWIFT flag that add-local-cc-cflags-before.sh checks to add -Xcc before the -Werror=unguarded-availability when needed, or we could create a wrapper specifically for swift | 05:53:49 |
samasaur | never mind that was silly, we already have the ability to prefix flags with -Xcc. let me see if that works or if I actually need to drop the flag entirely | 06:04:33 |
| Steve Reed changed their profile picture. | 06:16:11 |
samasaur | okay got it | 06:37:24 |
samasaur | https://github.com/NixOS/nixpkgs/pull/459987 | 07:13:38 |
delafthi | yes, I am | 09:41:51 |
| ghpzin (moved to @ghpzin:envs.net) changed their display name from ghpzin to ghpzin (moved to @ghpzin:envs.net). | 15:03:51 |