Age | Commit message (Collapse) | Author |
|
Default is disabled, enabled for unix port. Saves 600 bytes on x86.
|
|
This includes file and socket objects, backed by Unix file descriptor.
This improves compatibility with stmhal's uselect (and convenience of
use), though not completely: return value from poll.poll() is still
raw file descriptor.
|
|
|
|
|
|
To filter out even prototypes of mp_stream_posix_*() functions, which
require POSIX types like ssize_t & off_t, which may be not available in
some ports.
|
|
|
|
|
|
|
|
|
|
This allows to use printf() in a any source file with unix port, for quick
debugging.
|
|
Also, fix a warning text (remove "duplicate" BytesWarning).
|
|
|
|
Allows to build the library variant for other ports in parallel.
|
|
Make variable MICROPY_SSL_AXTLS=1 should be defined to activate modussl_axtls
and link with -laxtls.
|
|
The minimum thread stack size is set by pthreads (16k bytes) so we must
use that value for our minimum. The stack limit check is also adjusted
to work correctly for 32-bit builds.
|
|
Threading support is still very new so stay conservative at this point
and enable threading without the GIL. This requires users to protect
concurrent access of mutatable Python objects (eg lists) with locks at
the Python level (something you should probably do anyway). The
advantage is that there is less of a performance hit for non-threaded
code, because the VM does not need to constantly release/acquire the GIL.
In the future the GIL will be made more efficient. There is also room to
improve the efficiency of non-GIL code by not using mutex's if there is
only one thread active.
|
|
Due to the way modern compilers work (allocating space for stack vars once
at tha start of function, and deallocating once on exit from), using
intermediate stack buffer of big size caused blockage of 4K (PATH_MAX)
on stack for the entire duration of MicroPython execution.
|
|
|
|
E.g. -X heapsize=16Kfoo, -X heapsize=1G will lead to error.
|
|
By adjusting parser allocation policy.
|
|
|
|
But disable it for coverage build, as its extra warninsg aren't compatible
with K&R C BerkeleyDB uses.
|
|
We rely on the port setting and adjusting the stack size so there is
enough room to recover from hitting the stack limit.
|
|
|
|
|
|
|
|
SA_SIGINFO allows the signal handler to access more information about
the signal, especially useful in a threaded environment. The extra
information is not currently used but it may prove useful in the future.
|
|
This patch allows any given thread to do a proper garbage collection and
scan all the pointers of all active threads.
|
|
As per PEP-475.
|
|
|
|
|
|
Has the ability to create new threads.
|
|
|
|
The linker flag --gc-sections is not available on the linker used on
Mac OS X which results in an error when linking micropython on Mac OS X.
Therefore move this option to the LDFLAGS_ARCH variable on non Darwin
systems. According to http://stackoverflow.com/a/17710056 the equivalent
to --gc-sections is -dead_strip thus this option is used for the
LDFLAGS_ARCH on Darwin systems.
|
|
|
|
|
|
It's now used for more than just stream protocol (e.g. pin protocol), so
don't use false names.
|
|
It's enabled mostly for unit testing, and we do that in full with coverage
build.
|
|
|
|
When built for Linux, libffi includes very bloated and workaround exec-alloc
implementation required to work around SELinux and other "sekuritee" features
which real people don't use. MicroPython has own alloc-exec implementation,
used to alloc memory for @micropython.native code. With this option enabled,
uPy's implementation will override libffi's. This saves 11K on x86_64 (and
that accounts for more than half of the libffi code size).
TODO: Possibly, we want to refactor this option to allow either use uPy's
implementation even for libffi, or allow to use libffi's implementation even
for uPy.
|
|
Also try to use -fno-exceptions. Other options taken from libffi's configure
defaults.
|
|
|
|
This actually saves "only" 6K for x86_64 build, as we're still more or less
careful to #ifdef unneeded code. But relying on --gc-sections in a "lazy"
manner would allow to make #ifdef'ing less pervasive (not suggested right
away, but an option for the future).
|
|
MicroPython own readline implementation is superior now by providing
automatic indentation and completion (completion for GNU Readline was
never implemented). MICROPY_USE_READLINE=2 also wasn't build for a long
time and probably broken.
If GNU Readline is still beneficial for some cases, it can be achieved
with external wrappers like "rlwrap" (there will be the same level of
functionality, as again, there never was deep integration, like completion
support).
|
|
TODO: Do the same for other config files.
|
|
Was broken since introduction of FatFs support.
|
|
|
|
The call to stat() returns a 10 element tuple consistent to the os.stat()
call. At the moment, the only relevant information returned are file
type and file size.
|
|
Try to emulate "you can build without reading instructions" behavior as far
as possible.
|
|
Avoid using system libraries, use copies bundled with MicroPython as
submodules (currently affects only libffi, other dependencies either
already used as bundled-only (axtls), or can't be bundled (so far),
like libjni).
|