py/builtinimport: Remove weak links.
In order to keep "import umodule" working, the existing mechanism is
replaced with a simple fallback to drop the "u".
This makes importing of built-ins no longer touch the filesystem, which
makes a typical built-in import take ~0.15ms rather than 3-5ms.
(Weak links were added in c14a81662c)
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
@@ -871,11 +871,6 @@ typedef double mp_float_t;
|
||||
#define MICROPY_MODULE_GETATTR (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_CORE_FEATURES)
|
||||
#endif
|
||||
|
||||
// Whether module weak links are supported
|
||||
#ifndef MICROPY_MODULE_WEAK_LINKS
|
||||
#define MICROPY_MODULE_WEAK_LINKS (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_EXTRA_FEATURES)
|
||||
#endif
|
||||
|
||||
// Whether to enable importing foo.py with __name__ set to '__main__'
|
||||
// Used by the unix port for the -m flag.
|
||||
#ifndef MICROPY_MODULE_OVERRIDE_MAIN_IMPORT
|
||||
|
||||
Reference in New Issue
Block a user