Loading...
--- Libc/Libc-997.90.3/xcodescripts/generate_features.pl
+++ Libc/Libc-1158.1.2/xcodescripts/generate_features.pl
@@ -1,8 +1,4 @@
#!/usr/bin/perl
-
-if ($ENV{"ACTION"} eq "installhdrs") {
- exit 0;
-}
# Generates the libc-features.h files used to control #ifdef behaviour in Libc
use warnings;
@@ -23,9 +19,15 @@
{
# 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"};
- $platformName = "iphoneos" if ($platformName eq "iphonesimulator");
+ if ($ENV{"RC_BRIDGE"} eq "YES") {
+ $platformName = "bridgeos";
+ }
+
+ $platformName =~ s/simulator/os/;
my $platformPath = $ENV{"SRCROOT"} . "/Platforms/" . $platformName . "/Makefile.inc";
my $featuresHeaderDir = $ENV{"DERIVED_FILES_DIR"}."/".$arch;
@@ -126,6 +128,7 @@
my $shortarch = $arch;
$shortarch =~ s/armv\d+[a-z]?/arm/g;
+ $shortarch =~ s/arm64_32/arm64/g;
printf HEADER "#if !defined(__".$shortarch."__)\n";
printf HEADER "#error Mismatched libc-features.h architecture\n";
@@ -227,6 +230,12 @@
printf HEADER "/* #undef XPRINTF_PERF */\n";
}
+ if (defined($features{"FEATURE_SIGNAL_RESTRICTION"})) {
+ printf HEADER "#define FEATURE_SIGNAL_RESTRICTION 1\n";
+ } else {
+ printf HEADER "/* #undef FEATURE_SIGNAL_RESTRICTION */\n";
+ }
+
printf HEADER "#endif // _LIBC_FEATURES_H_\n";
close HEADER;
}