<Hermetic> Implement CPython2 Launcher in C++.
The launcher is actually a wrapper which will statically link Python
interpreter within the .par file. It is used to bootstrap embedded
interpreter.
The next step is to change/integrate with Soong to make this hermetic .par
generation process more automatic.
Bug: b/62380596
Test: The launcher has been tested using real files:
zip -r hermetic.zip entry_point.txt Stdlib/ runfiles/
cat launcher | cat - hermetic.zip > executable && chmod u+x executable
Change-Id: I293cae2fe74d46766044f3e3c4b654a54d319b67
diff --git a/Modules/config.c b/Modules/config.c
index 4f0e55e..807d1e9 100644
--- a/Modules/config.c
+++ b/Modules/config.c
@@ -75,6 +75,7 @@
extern void initresource(void);
extern void init_multibytecodec(void);
extern void init_multiprocessing(void);
+extern void initzlib(void);
/* -- ADDMODULE MARKER 1 -- */
@@ -138,6 +139,7 @@
{"resource", initresource},
{"_multibytecodec", init_multibytecodec},
{"_multiprocessing", init_multiprocessing},
+ {"zlib", initzlib},
/* -- ADDMODULE MARKER 2 -- */