SPM support?
johnburkey opened this issue ยท 12 comments
Hey, it looks like you have SPM support pretty close- im able to build our SPM projects with a --destination param and this JSON. But you can't build SwiftNIO because it has a module map to define c functions to call directly from swift. Any idea if anyone knows how to fix that?
{
"version": 1,
"sdk": "/Users/johnburkey/Library/Developer/Platforms/Android.platform/Developer/SDKs/Android.sdk",
"toolchain-bin-dir": "/Users/johnburkey/Downloads/swift-android-toolchain/usr/bin",
"target": "aarch64-unknown-linux-android",
"dynamic-library-extension": "so",
"extra-cc-flags": [
"-fPIC",
],
"extra-swiftc-flags": [
"-use-ld=gold"
],
"extra-cpp-flags": ["-lstdc++"]
}
swift-android-toolchain/usr/bin/android-swift-build -v --android-target aarch64-unknown-linux-android --destination android.json -c release -v
Ok, I was able to build SwiftNIO- actually the only issue im running into now is it really doesnt like making SPM debug builds. I have to specify -c release or it dies. (something about a module map flag)
Probably the error is "error: unknown argument: '-modulewrap'"
. I still have to figure out is this issue in build configuration settings (i.e. clang or swiftc) or it is an SPM issue (it passes this flag) to clang.
Full error:
rm -rf "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a"
mkdir -p "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a"
cd "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package" && /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/bin/android-swift-build --android-target armv7-none-linux-androideabi -c debug --build-path "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a" -v
SWIFT_EXEC="/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/bin/swiftc-arm-linux-androideabi" swift build -Xswiftc -v -Xswiftc -target -Xswiftc armv7-none-linux-androideabi -Xswiftc -sdk -Xswiftc /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain -c debug --build-path /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/bin/swiftc -v -Xcc -v -swift-version 5 -target armv7-none-linux-androideabi -tools-directory /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/bin -Xclang-linker --sysroot=/usr/local/ndk/20.1.5948944/platforms/android-24/arch-arm -Xclang-linker --gcc-toolchain=/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64 -Xcc -I/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include -Xcc -I/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi -L /usr/local/ndk/20.1.5948944/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a -L /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x -L /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/arm-linux-androideabi/24 -L /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/android/armv7 -module-name Lib -incremental -emit-dependencies -emit-module -emit-module-path /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug/Lib.swiftmodule -output-file-map /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug/Lib.build/output-file-map.json -parse-as-library -c /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/Sources/Lib/HelloMessage.swift -I /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug -target armv7-none-linux-android -swift-version 5 -enable-batch-mode -index-store-path /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug/index/store -sdk /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -F /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -I /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -L /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -Onone -enable-testing -g -j12 -DSWIFT_PACKAGE -DDEBUG -module-cache-path /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug/ModuleCache -parseable-output -color-diagnostics -target armv7-none-linux-androideabi -sdk /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChai/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/bin/swiftc -v -Xcc -v -swift-version 5 -target armv7-none-linux-androideabi -tools-directory /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/bin -Xclang-linker --sysroot=/usr/local/ndk/20.1.5948944/platforms/android-24/arch-arm -Xclang-linker --gcc-toolchain=/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64 -Xcc -I/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include -Xcc -I/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi -L /usr/local/ndk/20.1.5948944/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a -L /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x -L /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/arm-linux-androideabi/24 -L /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/android/armv7 -module-name Exe -incremental -emit-dependencies -emit-module -emit-module-path /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug/Exe.swiftmodule -output-file-map /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug/Exe.build/output-file-map.json -c /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/Sources/Exe/main.swift -I /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug -target armv7-none-linux-android -swift-version 5 -enable-batch-mode -index-store-path /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug/index/store -sdk /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -F /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -I /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -L /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -Onone -enable-testing -g -j12 -DSWIFT_PACKAGE -DDEBUG -module-cache-path /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-andclang version 10.0.0 (https://github.com/apple/llvm-project.git c39a810ec308dd4a8d93c5011fb73a5c987e8680)
Target: armv7-none-linux-android
Thread model: posix
InstalledDir:
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include"
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include
End of search list.
clang -cc1 version 10.0.0 based upon LLVM 10.0.0git default target x86_64-apple-darwin19.6.0
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include"
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi
/Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks (framework directory)
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug
/Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include
End of search list.
clang -cc1 version 10.0.0 based upon LLVM 10.0.0git default target x86_64-apple-darwin19.6.0
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include"
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi
/Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks (framework directory)
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug
/Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include
End of search list.
clang -cc1 version 10.0.0 based upon LLVM 10.0.0git default target x86_64-apple-darwin19.6.0
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include"
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi
/Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks (framework directory)
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug
/Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include
End of search list.
clang -cc1 version 10.0.0 based upon LLVM 10.0.0git default target x86_64-apple-darwin19.6.0
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include"
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi
/Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks (framework directory)
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug
/Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include
End of search list.
clang -cc1 version 10.0.0 based upon LLVM 10.0.0git default target x86_64-apple-darwin19.6.0
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include"
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi
/Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks (framework directory)
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug
/Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include
End of search list.
clang -cc1 version 10.0.0 based upon LLVM 10.0.0git default target x86_64-apple-darwin19.6.0
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include"
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi
/Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks (framework directory)
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug
/Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include
End of search list.
clang -cc1 version 10.0.0 based upon LLVM 10.0.0git default target x86_64-apple-darwin19.6.0
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include"
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi
/Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks (framework directory)
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug
/Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include
End of search list.
clang -cc1 version 10.0.0 based upon LLVM 10.0.0git default target x86_64-apple-darwin19.6.0
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include"
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi
/Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks (framework directory)
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug
/Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include
End of search list.
clang -cc1 version 10.0.0 based upon LLVM 10.0.0git default target x86_64-apple-darwin19.6.0
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include"
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi
/Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks (framework directory)
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug
/Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include
End of search list.
clang version 10.0.0 (https://github.com/apple/llvm-project.git c39a810ec308dd4a8d93c5011fb73a5c987e8680)
Target: armv7-none-linux-android
Thread model: posix
InstalledDir:
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include"
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include
End of search list.
clang version 10.0.0 (https://github.com/apple/llvm-project.git c39a810ec308dd4a8d93c5011fb73a5c987e8680)
Target: armv7-none-linux-android
Thread model: posix
InstalledDir:
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include"
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include
End of search list.
clang version 10.0.0 (https://github.com/apple/llvm-project.git c39a810ec308dd4a8d93c5011fb73a5c987e8680)
Target: armv7-none-linux-android
Thread model: posix
InstalledDir:
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include"
ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include
/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include
/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include
End of search list.
<unknown>:0: error: unknown argument: '-modulewrap'
<unknown>:0: error: unknown argument: '-modulewrap'
[4/8] Wrapping AST for Exe for debugging
Execution of command is failed:
cd "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package" && /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/bin/android-swift-build --android-target armv7-none-linux-androideabi -c debug --build-path "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a" -v
Probably the error is
"error: unknown argument: '-modulewrap'"
. I still have to figure out is this issue in build configuration settings (i.e. clang or swiftc) or it is an SPM issue (it passes this flag) to clang.Full error:
rm -rf "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a" mkdir -p "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a" cd "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package" && /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/bin/android-swift-build --android-target armv7-none-linux-androideabi -c debug --build-path "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a" -v SWIFT_EXEC="/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/bin/swiftc-arm-linux-androideabi" swift build -Xswiftc -v -Xswiftc -target -Xswiftc armv7-none-linux-androideabi -Xswiftc -sdk -Xswiftc /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain -c debug --build-path /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/bin/swiftc -v -Xcc -v -swift-version 5 -target armv7-none-linux-androideabi -tools-directory /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/bin -Xclang-linker --sysroot=/usr/local/ndk/20.1.5948944/platforms/android-24/arch-arm -Xclang-linker --gcc-toolchain=/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64 -Xcc -I/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include -Xcc -I/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi -L /usr/local/ndk/20.1.5948944/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a -L /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x -L /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/arm-linux-androideabi/24 -L /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/android/armv7 -module-name Lib -incremental -emit-dependencies -emit-module -emit-module-path /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug/Lib.swiftmodule -output-file-map /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug/Lib.build/output-file-map.json -parse-as-library -c /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/Sources/Lib/HelloMessage.swift -I /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug -target armv7-none-linux-android -swift-version 5 -enable-batch-mode -index-store-path /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug/index/store -sdk /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -F /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -I /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -L /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -Onone -enable-testing -g -j12 -DSWIFT_PACKAGE -DDEBUG -module-cache-path /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug/ModuleCache -parseable-output -color-diagnostics -target armv7-none-linux-androideabi -sdk /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChai/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/bin/swiftc -v -Xcc -v -swift-version 5 -target armv7-none-linux-androideabi -tools-directory /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/bin -Xclang-linker --sysroot=/usr/local/ndk/20.1.5948944/platforms/android-24/arch-arm -Xclang-linker --gcc-toolchain=/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64 -Xcc -I/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include -Xcc -I/usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi -L /usr/local/ndk/20.1.5948944/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a -L /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x -L /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/arm-linux-androideabi/24 -L /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/android/armv7 -module-name Exe -incremental -emit-dependencies -emit-module -emit-module-path /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug/Exe.swiftmodule -output-file-map /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug/Exe.build/output-file-map.json -c /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/Sources/Exe/main.swift -I /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug -target armv7-none-linux-android -swift-version 5 -enable-batch-mode -index-store-path /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug/index/store -sdk /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -F /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -I /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -L /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -Onone -enable-testing -g -j12 -DSWIFT_PACKAGE -DDEBUG -module-cache-path /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-andclang version 10.0.0 (https://github.com/apple/llvm-project.git c39a810ec308dd4a8d93c5011fb73a5c987e8680) Target: armv7-none-linux-android Thread model: posix InstalledDir: ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include" ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include" #include "..." search starts here: #include <...> search starts here: /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include End of search list. clang -cc1 version 10.0.0 based upon LLVM 10.0.0git default target x86_64-apple-darwin19.6.0 ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include" ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include" #include "..." search starts here: #include <...> search starts here: /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks (framework directory) /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include End of search list. clang -cc1 version 10.0.0 based upon LLVM 10.0.0git default target x86_64-apple-darwin19.6.0 ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include" ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include" #include "..." search starts here: #include <...> search starts here: /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks (framework directory) /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include End of search list. clang -cc1 version 10.0.0 based upon LLVM 10.0.0git default target x86_64-apple-darwin19.6.0 ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include" ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include" #include "..." search starts here: #include <...> search starts here: /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks (framework directory) /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include End of search list. clang -cc1 version 10.0.0 based upon LLVM 10.0.0git default target x86_64-apple-darwin19.6.0 ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include" ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include" #include "..." search starts here: #include <...> search starts here: /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks (framework directory) /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include End of search list. clang -cc1 version 10.0.0 based upon LLVM 10.0.0git default target x86_64-apple-darwin19.6.0 ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include" ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include" #include "..." search starts here: #include <...> search starts here: /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks (framework directory) /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include End of search list. clang -cc1 version 10.0.0 based upon LLVM 10.0.0git default target x86_64-apple-darwin19.6.0 ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include" ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include" #include "..." search starts here: #include <...> search starts here: /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks (framework directory) /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include End of search list. clang -cc1 version 10.0.0 based upon LLVM 10.0.0git default target x86_64-apple-darwin19.6.0 ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include" ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include" #include "..." search starts here: #include <...> search starts here: /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks (framework directory) /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include End of search list. clang -cc1 version 10.0.0 based upon LLVM 10.0.0git default target x86_64-apple-darwin19.6.0 ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include" ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include" #include "..." search starts here: #include <...> search starts here: /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks (framework directory) /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include End of search list. clang -cc1 version 10.0.0 based upon LLVM 10.0.0git default target x86_64-apple-darwin19.6.0 ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include" ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include" #include "..." search starts here: #include <...> search starts here: /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks (framework directory) /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a/armv7-none-linux-android/debug /Volumes/Apps/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include End of search list. clang version 10.0.0 (https://github.com/apple/llvm-project.git c39a810ec308dd4a8d93c5011fb73a5c987e8680) Target: armv7-none-linux-android Thread model: posix InstalledDir: ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include" ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include" #include "..." search starts here: #include <...> search starts here: /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include End of search list. clang version 10.0.0 (https://github.com/apple/llvm-project.git c39a810ec308dd4a8d93c5011fb73a5c987e8680) Target: armv7-none-linux-android Thread model: posix InstalledDir: ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include" ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include" #include "..." search starts here: #include <...> search starts here: /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include End of search list. clang version 10.0.0 (https://github.com/apple/llvm-project.git c39a810ec308dd4a8d93c5011fb73a5c987e8680) Target: armv7-none-linux-android Thread model: posix InstalledDir: ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/local/include" ignoring nonexistent directory "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/include" #include "..." search starts here: #include <...> search starts here: /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include /usr/local/ndk/20.1.5948944/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/arm-linux-androideabi /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/lib/swift/clang/include /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/include End of search list. <unknown>:0: error: unknown argument: '-modulewrap' <unknown>:0: error: unknown argument: '-modulewrap' [4/8] Wrapping AST for Exe for debugging Execution of command is failed: cd "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package" && /Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/ToolChain/swift-android-toolchain/usr/bin/android-swift-build --android-target armv7-none-linux-androideabi -c debug --build-path "/Volumes/Shared/Git/MyProjects/swift-everywhere-toolchain/Tests/sample-package/build/armv7a" -v
I think it is an SPM issue.
My solution:
Relative code:
The toolchain with SPM that compiled by myself:
https://github.com/Guang1234567/swift-android-toolchain_5_2_5_release_ndk_20
Ok. The issue with SPM Debug Builds now fixed in https://github.com/vgorloff/swift-everywhere-toolchain/releases/tag/1.0.57.
Closing issue.
Thanks for this, we've standardized around SPM for our rather massive builds, for all platforms, and this makes it really. The trunk SPM support for Android via linux is still kaput.
The trunk SPM support for Android via linux is still kaput.
@johnburkey
swift-android-linux-toolchain is supported by apple.
Here is the command:
./swift/utils/build-script \
--preset buildbot_linux_crosscompile_android,tools=RA,stdlib=RD,build,aarch64 \
ndk_path=/home/ubuntu/android-ndk-r17 \
arm_dir=/home/ubuntu/libiconv-libicu-android/arm64-v8a \
install_destdir=/home/ubuntu/jenkins/workspace/oss-swift-RA-linux-ubuntu-16.04-android-arm64/swift-nightly-install \
installable_package=/home/ubuntu/jenkins/workspace/oss-swift-RA-linux-ubuntu-16.04-android-arm64/6738-android.tar.gz
Does that give you a build where you can call "swift build -destination ?โ ?
Some Org like swift-android
alreadly provide some Script wrapper
for spm
to support swift-build --destination= ....
The command preview:
$SWIFT_ANDROID_HOME/toolchain/usr/bin/swift-build --destination=<($SELF_DIR/generate-destination-json.sh)
More detail:
BTW:
swift-android
also provide a gradle plugin named com.readdle.android.swift
to integrate swift-build --destination= ....
and swift-android-toolchain
with Android Studio 4.1 (newest version)
. More detail look into the example please.
PS:
example only test on macOS !!!
Thanks.