Comments (3)
The folder layout, shown below, with the target build subfolder x86_64-apple-macosx
is produced by "Swift Package Manager" (https://github.com/apple/swift-package-manager).
At the moment "Swift Package Manager" officially not supporting Android targets. Thats why subfolder name is x86_64-apple-macosx
.
Maybe later we will also provide embedded "Swift Package Manager" which will produce directory structure with appropriate Android target names.
├── .build
│ └── x86_64-apple-macosx
from swift-everywhere-toolchain.
Thanks your reply.
I find the other solution without provide embedded spm
accidentally.
$SWIFT_ANDROID_HOME/toolchain/usr/bin/swift-build --destination=<($SELF_DIR/generate-destination-json.sh) $flags "$@"
Just pass —destination
to spm
, and the generate-destination-json.sh should be like below:
#!/bin/bash
: "${SWIFT_ANDROID_HOME:?$SWIFT_ANDROID_HOME should be set}"
: "${ANDROID_NDK_HOME:?$ANDROID_NDK_HOME should be set}"
EXTERNAL_TOOLCHAIN="$ANDROID_NDK_HOME/toolchains/$TOOLCHAIN_ROOT-4.9/prebuilt/darwin-x86_64"
cat <<JSON
{
"version": 1,
"dynamic-library-extension": "so",
"target": "$TARGET",
# …….
}
JSON
"target": "$TARGET"
is the point. And the $TARGET
is a env var
.
export TARGET = x86_64-unknown-linux-android
export TARGET = aarch64-unknown-linux-android
export TARGET = armv7-none-linux-androideabi
from swift-everywhere-toolchain.
In addition, swift-everywhere-toolchain
can be wrapped by readdle/swift-android-gradle and readdle/swift-android-toolchain.
But readdle/swift-android-toolchain is 5.0-r9
, so i use swift-everywhere-toolchain
to instead it today and success.
from swift-everywhere-toolchain.
Related Issues (20)
- Update to use last LTS release of NDK r21e - 21.4.7075529 HOT 1
- build toolchain for linux host machines HOT 4
- Update to use Swift v5.4.1 HOT 1
- host MacOS failed build for android NDK arm-linux-androideabi-gcc on $PATH at (eval 10) line 124. HOT 3
- SIGSEGV when calling print() HOT 5
- `null pointer dereference` crash on armeabi-v7a HOT 4
- Update to Swift release 5.4.2 HOT 1
- error: no such module 'Darwin.C' @_exported import Darwin.C while compile HOT 2
- swift package build fail HOT 15
- Update to use Swift 5.4.3 HOT 1
- Update to use Swift 5.5 HOT 12
- Question about build process HOT 6
- Where is concurrency lib? HOT 57
- Notarize toolchain.
- Toolchain for Apple Silicon HOT 2
- Does the build work right now? HOT 2
- CMath build errors HOT 1
- build error when xcode 13.3 command line tools are installed
- m1 apple silicon builds
- __aarch64_ldadd1_relax
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift-everywhere-toolchain.