Skip to content

Commit

Permalink
Produce a smaller Framework binary on Darwin by default. (#13009)
Browse files Browse the repository at this point in the history
Defaults to the Release configuration (-Os instead of -O0) and tries
to avoid exposing C++ symbols, since the framework consumers won't be
using them.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Dec 23, 2021
1 parent 39b544b commit c05d455
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/darwin/Framework/CHIP.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "-Wl,-unexported_symbol,\"__Z*\"";
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx";
SUPPORTS_TEXT_BASED_API = YES;
Expand Down Expand Up @@ -671,6 +672,7 @@
"-framework",
CoreBluetooth,
"-lnetwork",
"-Wl,-unexported_symbol,\"__Z*\"",
);
"OTHER_LDFLAGS[sdk=macosx*]" = (
"-framework",
Expand All @@ -680,6 +682,7 @@
CoreBluetooth,
"-framework",
CoreData,
"-Wl,-unexported_symbol,\"__Z*\"",
);
PRODUCT_BUNDLE_IDENTIFIER = com.chip.CHIP;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
Expand Down Expand Up @@ -753,6 +756,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "-Wl,-unexported_symbol,\"__Z*\"";
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx";
SUPPORTS_TEXT_BASED_API = YES;
Expand Down Expand Up @@ -803,6 +807,7 @@
Foundation,
"-framework",
CoreBluetooth,
"-Wl,-unexported_symbol,\"__Z*\"",
);
PRODUCT_BUNDLE_IDENTIFIER = com.chip.CHIP;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
Expand Down Expand Up @@ -838,7 +843,7 @@
BA09EB772474882200605257 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
defaultConfigurationName = Release;
};
B20252A12459E34F00F97062 /* Build configuration list for PBXNativeTarget "CHIP" */ = {
isa = XCConfigurationList;
Expand All @@ -847,7 +852,7 @@
BA09EB782474882200605257 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
defaultConfigurationName = Release;
};
B20252A42459E34F00F97062 /* Build configuration list for PBXNativeTarget "CHIPTests" */ = {
isa = XCConfigurationList;
Expand All @@ -856,7 +861,7 @@
BA09EB792474882200605257 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down

0 comments on commit c05d455

Please sign in to comment.