diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e8b26a7f2..65e2bb3d56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ [Full changelog](https://github.com/mozilla/glean/compare/v51.8.2...main) +* iOS + * Avoid building a dynamic library ([#2285](https://github.com/mozilla/glean/pull/2285)). + Note: v51.8.1 and 51.8.2 are **not** working on iOS and will break the build due to accidentally including a link to a dynamic library. + # v51.8.2 (2022-11-17) [Full changelog](https://github.com/mozilla/glean/compare/v51.8.1...v51.8.2) diff --git a/build-scripts/xc-universal-binary.sh b/build-scripts/xc-universal-binary.sh index 1358a42276..ba9678f51f 100644 --- a/build-scripts/xc-universal-binary.sh +++ b/build-scripts/xc-universal-binary.sh @@ -46,16 +46,16 @@ for arch in $ARCHS; do # Intel iOS simulator export CFLAGS_x86_64_apple_ios="-target x86_64-apple-ios" - $HOME/.cargo/bin/cargo build -p $FFI_TARGET --lib $RELFLAG --target x86_64-apple-ios + $HOME/.cargo/bin/cargo rustc -p $FFI_TARGET --lib --crate-type staticlib $RELFLAG --target x86_64-apple-ios ;; arm64) if [ $IS_SIMULATOR -eq 0 ]; then # Hardware iOS targets - $HOME/.cargo/bin/cargo build -p $FFI_TARGET --lib $RELFLAG --target aarch64-apple-ios + $HOME/.cargo/bin/cargo rustc -p $FFI_TARGET --lib --crate-type staticlib $RELFLAG --target aarch64-apple-ios else # M1 iOS simulator -- currently in Nightly only and requires to build `libstd` - $HOME/.cargo/bin/cargo build -p $FFI_TARGET --lib $RELFLAG --target aarch64-apple-ios-sim + $HOME/.cargo/bin/cargo rustc -p $FFI_TARGET --lib --crate-type staticlib $RELFLAG --target aarch64-apple-ios-sim fi esac done diff --git a/glean-core/bundle-android/Cargo.toml b/glean-core/bundle-android/Cargo.toml index c1ee55e6aa..6bea846c03 100644 --- a/glean-core/bundle-android/Cargo.toml +++ b/glean-core/bundle-android/Cargo.toml @@ -4,7 +4,7 @@ name = "glean-bundle-android" version = "1.0.0" authors = ["The Glean Team "] edition = "2018" -description = "Static/Dynamic library build of glean-ffi, for use in Android builds" +description = "Dynamic library build of glean-ffi, for use in Android builds" repository = "https://github.com/mozilla/glean" license = "MPL-2.0" diff --git a/samples/ios/app/glean-sample-app.xcodeproj/project.pbxproj b/samples/ios/app/glean-sample-app.xcodeproj/project.pbxproj index bf8a41c979..ecbead5024 100644 --- a/samples/ios/app/glean-sample-app.xcodeproj/project.pbxproj +++ b/samples/ios/app/glean-sample-app.xcodeproj/project.pbxproj @@ -19,9 +19,10 @@ BFDA7AD02371CE4900575C7B /* ViewControllerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFDA7ACF2371CE4900575C7B /* ViewControllerTest.swift */; }; BFDA7AD22371D2BA00575C7B /* MockServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFDA7AD12371D2BA00575C7B /* MockServer.swift */; }; BFED6B2C238C1638006E2BC4 /* DeletionRequestPingTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFED6B2B238C1638006E2BC4 /* DeletionRequestPingTest.swift */; }; - CD70CF8C2850D3F400FC2014 /* Glean.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD70CF8B2850D3F400FC2014 /* Glean.xcframework */; }; CD70CF8E2850D4B700FC2014 /* Swifter in Frameworks */ = {isa = PBXBuildFile; productRef = CD70CF8D2850D4B700FC2014 /* Swifter */; }; CD70CF902850D4BA00FC2014 /* Gzip in Frameworks */ = {isa = PBXBuildFile; productRef = CD70CF8F2850D4BA00FC2014 /* Gzip */; }; + CD802A47292E5AC800D46BE9 /* Glean.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD70CF8B2850D3F400FC2014 /* Glean.xcframework */; }; + CD802A48292E5AC800D46BE9 /* Glean.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = CD70CF8B2850D3F400FC2014 /* Glean.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; CD99D84625F131D600BD5339 /* EventPingTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD99D84525F131D600BD5339 /* EventPingTest.swift */; }; /* End PBXBuildFile section */ @@ -49,6 +50,7 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( + CD802A48292E5AC800D46BE9 /* Glean.xcframework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -79,7 +81,6 @@ BFDA7AD12371D2BA00575C7B /* MockServer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockServer.swift; sourceTree = ""; }; BFE1E7D523435A600067A12A /* sdk_generator.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = sdk_generator.sh; sourceTree = ""; }; BFED6B2B238C1638006E2BC4 /* DeletionRequestPingTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeletionRequestPingTest.swift; sourceTree = ""; }; - CD70CF8A2850D3DE00FC2014 /* app */ = {isa = PBXFileReference; lastKnownFileType = folder; name = app; sourceTree = ""; }; CD70CF8B2850D3F400FC2014 /* Glean.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Glean.xcframework; path = ../../../build/archives/Glean.xcframework; sourceTree = ""; }; CD99D84525F131D600BD5339 /* EventPingTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EventPingTest.swift; sourceTree = ""; }; /* End PBXFileReference section */ @@ -89,7 +90,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - CD70CF8C2850D3F400FC2014 /* Glean.xcframework in Frameworks */, + CD802A47292E5AC800D46BE9 /* Glean.xcframework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -124,7 +125,6 @@ isa = PBXGroup; children = ( CD70CF8B2850D3F400FC2014 /* Glean.xcframework */, - CD70CF8A2850D3DE00FC2014 /* app */, BF6F41C4234346A000E222A8 /* metrics.yaml */, BF8966592371C82E0097B7F2 /* pings.yaml */, BFE1E7D523435A600067A12A /* sdk_generator.sh */,