Comments (10)
A Posix_spawn implementation from FreeBSD (modified to use fork instead of vfork (which is too sketchy)) worked fine.
Looks like the lack of random number generation is being caught in the unit test: test/1_stdlib/ReflectionHashing.swift aborts probably because of missing random.
from swift.
Need to replace the existing getline, posix_spawn, and SunSoft libm stuff with either public domain or LLVM code - https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151221/000547.html
from swift.
I'd like to work on documenting a list of SwiftAndroid's dependencies, and which of those use incompatible licenses. I'd also like to consider sacrificing some dependencies/Swift features (see 1dde6bd for an example) in favor of merging this fork upstream. What do you all think?
from swift.
4a39bc6getline
from Android sourceposix_spawn
from FreeBSD libcThe SubSoft libm floating point routines in4a39bc6stdlib/public/stubs/android_support/
1dde6bdexecinfo.h
Is that right?
from swift.
Is it possible to just tear out the FreeBSD I guess it isn't, since posix_spawn
implementation, and instead simply have that functionality unavailable on Android?stdlib/private/SwiftPrivateDarwinExtras/Subprocess.swift
and the test suite rely on it so heavily. Hmm...
from swift.
That should be it. The test suite doesn't require a whole lot of functionality from posix_spawn - just redirect file descriptors, if I recall; it might be possible to just rewrite it
from swift.
I'm looking at https://github.com/apple/swift/blob/e094e9f10ca4a63e195295e74dc852e5dd5a3234/lib/Basic/Unix/TaskQueue.inc#L133, and I bet we could do something similar for the unit tests--using posix_spawn
if available, and fork
if not.
from swift.
posix_spawn
is more efficient on Darwin and Win32 (and fork
doesn't exist at all in mobile Darwin variants), so we'd prefer that posix_spawn
still be used when available.
from swift.
@jckarter Absolutely. This will just be a fallback for platforms for which posix_spawn
is unavailable. 👍
By the way, I notice swift/lib/Basic/Unix/TaskQueue.inc
uses a macro HAVE_POSIX_SPAWN
. I don't suppose you know of anything similar I can use in the Swift file swift/stdlib/private/SwiftPrivateDarwinExtras/Subprocess.swift
? For the time being I'm using #if os(Android)
.
from swift.
This has mostly been taken care of upstream, through a combination of raising the minimum API level and implementing custom workarounds for StdlibUnittest. Still some room for improvement, though: https://bugs.swift.org/browse/SR-1746
from swift.
Related Issues (16)
- Setting up environment HOT 2
- JNI Support HOT 6
- Cross-compile for Android from OSX HOT 19
- Current status in NDK usage? HOT 6
- 1_stdlib/VarArgs.swift HOT 10
- IRGen/objc_simd.sil HOT 5
- stdlib/FixedPoint.swift.gyb
- libicu data files need to be pushed to device HOT 2
- Problem building on Ubuntu 15.10 HOT 2
- Lib Bionic doesn't compile HOT 5
- Enums and Protocol conformance causes segfault on android HOT 3
- Get tests running HOT 8
- libicu doesn't link at runtime on android systems with their own icu HOT 13
- Find the correct way to package libicu data files HOT 10
- Can share info about how to start porting to Windows.. HOT 4
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.