]> git.saurik.com Git - apple/libc.git/blobdiff - xcodescripts/generate_features.pl
Libc-1244.1.7.tar.gz
[apple/libc.git] / xcodescripts / generate_features.pl
index ac5479559ac3ea2c10a3f8033622be14a12dcfc6..0704fcd6b3f323ba34e56b7149adb891e41c4488 100755 (executable)
@@ -19,8 +19,14 @@ for my $arch (split(/ /, $ENV{"ARCHS"}))
 {
        # set ENV{"CURRENT_ARCH"} so we can predicate on it
        $ENV{"CURRENT_ARCH"} = $arch;
-       
+
+       # BridgeOS shares the same platform name than the watch so
+       # we need to fix it and pick the right configuration.
        my $platformName = $ENV{"PLATFORM_NAME"};
+       if ($ENV{"RC_BRIDGE"} eq "YES") {
+               $platformName = "bridgeos";
+       }
+
        $platformName =~ s/simulator/os/;
 
        my $platformPath = $ENV{"SRCROOT"} . "/Platforms/" . $platformName . "/Makefile.inc";
@@ -74,16 +80,11 @@ for my $arch (split(/ /, $ENV{"ARCHS"}))
        }
 
        elsif ($unifdef == 1) {
-               if ($platformName eq "macosx") {
-                       $unifdefs{"__OSX_OPEN_SOURCE__"} = 1;
-               }
                # assume FEATURE_BLOCKS was on by default
                $unifdefs{"UNIFDEF_BLOCKS"} = 1;
                $unifdefs{"UNIFDEF_LEGACY_64_APIS"} = defined($features{"FEATURE_LEGACY_64_APIS"});
                $unifdefs{"UNIFDEF_LEGACY_RUNE_APIS"} = defined($features{"FEATURE_LEGACY_RUNE_APIS"});
                $unifdefs{"UNIFDEF_LEGACY_UTMP_APIS"} = defined($features{"FEATURE_LEGACY_UTMP_APIS"});
-               $unifdefs{"UNIFDEF_MOVE_LOCALTIME"} = defined($features{"FEATURE_MOVE_LOCALTIME"});
-               $unifdefs{"UNIFDEF_TZDIR_SYMLINK"} = defined($features{"FEATURE_TZDIR_SYMLINK"});
                
                my $output = "";
                for my $d (keys %unifdefs) {
@@ -123,6 +124,9 @@ for my $arch (split(/ /, $ENV{"ARCHS"}))
                my $shortarch = $arch;
                $shortarch =~ s/armv\d+[a-z]?/arm/g;
 
+               # map all arm64 subtypes to arm64
+               $shortarch =~ s/arm64[_a-z0-9]?/arm64/g;
+
                printf HEADER "#if !defined(__".$shortarch."__)\n";
                printf HEADER "#error Mismatched libc-features.h architecture\n";
                printf HEADER "#endif\n\n";
@@ -145,18 +149,6 @@ for my $arch (split(/ /, $ENV{"ARCHS"}))
                        printf HEADER "/* #undef UNIFDEF_LEGACY_UTMP_APIS */\n";
                }
 
-               if (defined($features{"FEATURE_MOVE_LOCALTIME"})) {
-                       printf HEADER "#define UNIFDEF_MOVE_LOCALTIME 1\n";
-               } else {
-                       printf HEADER "/* #undef UNIFDEF_MOVE_LOCALTIME */\n";
-               }
-
-               if (defined($features{"FEATURE_TZDIR_SYMLINK"})) {
-                       printf HEADER "#define UNIFDEF_TZDIR_SYMLINK 1\n";
-               } else {
-                       printf HEADER "/* #undef UNIFDEF_TZDIR_SYMLINK */\n";
-               }
-
                if (defined($features{"FEATURE_ONLY_1050_VARIANTS"})) {
                        printf HEADER "#if !__DARWIN_ONLY_VERS_1050\n";
                        printf HEADER "#  error Feature mismatch: __DARWIN_ONLY_VERS_1050 == 0\n";
@@ -205,12 +197,6 @@ for my $arch (split(/ /, $ENV{"ARCHS"}))
                        printf HEADER "/* #undef NOTIFY_TZ */\n";
                }
 
-               if (defined($features{"FEATURE_NO_LIBCRASHREPORTERCLIENT"})) {
-                       printf HEADER "#define LIBC_NO_LIBCRASHREPORTERCLIENT 1\n";
-               } else {
-                       printf HEADER "/* #undef LIBC_NO_LIBCRASHREPORTERCLIENT */\n";
-               }
-
                if (defined($features{"FEATURE_SMALL_STDIOBUF"})) {
                        printf HEADER "#define FEATURE_SMALL_STDIOBUF 1\n";
                } else {