Skip to content

Commit

Permalink
Add -Xlinker -no_application_extension to OTHER_LDFLAGS to silenc…
Browse files Browse the repository at this point in the history
…e a linker warning

This silences the "linking against a dylib which is not safe for use in application extensions: /Applications/Xcode.app/path/to/libswiftXCTest.dylib" linker warning.
  • Loading branch information
ikesyo committed Jun 19, 2018
1 parent 52a2adc commit 519c275
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Nimble.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Pod::Spec.new do |s|
s.pod_target_xcconfig = {
'APPLICATION_EXTENSION_API_ONLY' => 'YES',
'ENABLE_BITCODE' => 'NO',
'OTHER_LDFLAGS' => '-weak-lswiftXCTest',
'OTHER_LDFLAGS' => '$(inherited) -weak-lswiftXCTest -Xlinker -no_application_extension',
'OTHER_SWIFT_FLAGS' => '$(inherited) -suppress-warnings',
'FRAMEWORK_SEARCH_PATHS' => '$(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks"',
}
Expand Down
18 changes: 18 additions & 0 deletions Nimble.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1933,9 +1933,12 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"$(inherited)",
"-weak_framework",
XCTest,
"-weak-lswiftXCTest",
"-Xlinker",
"-no_application_extension",
);
PRODUCT_BUNDLE_IDENTIFIER = "net.jeffhui.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_MODULE_NAME = Nimble;
Expand Down Expand Up @@ -1967,9 +1970,12 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
OTHER_LDFLAGS = (
"$(inherited)",
"-weak_framework",
XCTest,
"-weak-lswiftXCTest",
"-Xlinker",
"-no_application_extension",
);
PRODUCT_BUNDLE_IDENTIFIER = "net.jeffhui.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_MODULE_NAME = Nimble;
Expand Down Expand Up @@ -2043,9 +2049,12 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = YES;
OTHER_LDFLAGS = (
"$(inherited)",
"-weak_framework",
XCTest,
"-weak-lswiftXCTest",
"-Xlinker",
"-no_application_extension",
);
PRODUCT_BUNDLE_IDENTIFIER = "net.jeffhui.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_MODULE_NAME = Nimble;
Expand Down Expand Up @@ -2080,9 +2089,12 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = (
"$(inherited)",
"-weak_framework",
XCTest,
"-weak-lswiftXCTest",
"-Xlinker",
"-no_application_extension",
);
PRODUCT_BUNDLE_IDENTIFIER = "net.jeffhui.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_MODULE_NAME = Nimble;
Expand Down Expand Up @@ -2160,9 +2172,12 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
METAL_ENABLE_DEBUG_INFO = YES;
OTHER_LDFLAGS = (
"$(inherited)",
"-weak_framework",
XCTest,
"-weak-lswiftXCTest",
"-Xlinker",
"-no_application_extension",
);
PRODUCT_BUNDLE_IDENTIFIER = "net.jeffhui.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_MODULE_NAME = Nimble;
Expand Down Expand Up @@ -2197,9 +2212,12 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
METAL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = (
"$(inherited)",
"-weak_framework",
XCTest,
"-weak-lswiftXCTest",
"-Xlinker",
"-no_application_extension",
);
PRODUCT_BUNDLE_IDENTIFIER = "net.jeffhui.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_MODULE_NAME = Nimble;
Expand Down

0 comments on commit 519c275

Please sign in to comment.