Force macOS 10.15 or later to be 64-bit
macOS Catalina (10.15) no longer supports 32-bit applications.
Do not wait 5 seconds to give the user the option of using KERNEL_BITS=32
Do not accept the KERNEL_BITS=32 option
@@ -485,6 +485,14 @@ EOF
[ 'x86_64-apple-darwin.*',
sub {
my $KERNEL_BITS = $ENV{KERNEL_BITS} // '';
+ # macOS >= 10.15 is 64-bit only
+ my $SW_VERS = `sw_vers -productVersion 2>/dev/null`;
+ if ($SW_VERS =~ /^(\d+)\.(\d+)\.(\d+)$/) {
+ if ($1 > 10 || ($1 == 10 && $2 >= 15)) {
+ die "32-bit applications not supported on macOS 10.15 or later\n" if $KERNEL_BITS eq '32';
+ return { target => "darwin64-x86_64" };
+ }
+ }
return { target => "darwin-i386" } if $KERNEL_BITS eq '32';
print <<EOF;
