| 1 | `build/` directory
 | 
| 2 | ==================
 | 
| 3 | 
 | 
| 4 | A mix of old "OVM" scripts and new `oil-native` Ninja scripts.
 | 
| 5 | 
 | 
| 6 | ## Old CPython Slice
 | 
| 7 | 
 | 
| 8 | Quick smoke test:
 | 
| 9 | 
 | 
| 10 |    build/old-ovm-test.sh test-oil-bundle
 | 
| 11 | 
 | 
| 12 | ### Python Behavior Changes
 | 
| 13 | 
 | 
| 14 | Almost all changes remove unused code, but here is a list of behavior changes:
 | 
| 15 | 
 | 
| 16 | - `Objects/typeobject.c : type_new()` -- I commented out `_Py_Mangle`.  This
 | 
| 17 |   turns `self.__foo` into something else.  That won't break my code, but it
 | 
| 18 |   might break third-party code?
 | 
| 19 |   - TODO: Perhaps find the corresponding compile-time time check in
 | 
| 20 |     `compiler2`?
 | 
| 21 | 
 | 
| 22 | ## Directory Structure for C++ Build
 | 
| 23 | 
 | 
| 24 | ### Code
 | 
| 25 | 
 | 
| 26 |     ./NINJA-config.sh    # Run this to generate build.ninja
 | 
| 27 |     build.ninja          # What's executed by the ninja tool
 | 
| 28 | 
 | 
| 29 |     build/
 | 
| 30 |       ninja_main.py      # Invoked by ./NINJA-config.sh
 | 
| 31 |       ninja_lib.py       # rules
 | 
| 32 | 
 | 
| 33 |       # TODO: rename to "steps"
 | 
| 34 |       ninja-rules-py.sh
 | 
| 35 |       ninja-rules-cpp.sh
 | 
| 36 | 
 | 
| 37 |     core/
 | 
| 38 |       NINJA_subgraph.py
 | 
| 39 |       TEST.sh
 | 
| 40 | 
 | 
| 41 |     cpp/
 | 
| 42 |       NINJA_subgraph.py
 | 
| 43 |       TEST.sh
 | 
| 44 | 
 | 
| 45 |     mycpp/
 | 
| 46 |       NINJA_subgraph.py  # This file describes dependencies programmatically
 | 
| 47 |       TEST.sh            # test driver for unit tests and examples
 | 
| 48 | 
 | 
| 49 |       examples/
 | 
| 50 |         cgi.py
 | 
| 51 |         varargs.py
 | 
| 52 |         varargs_preamble.h
 | 
| 53 | 
 | 
| 54 | ### Data
 | 
| 55 | 
 | 
| 56 |     _gen/
 | 
| 57 |       bin/ 
 | 
| 58 |         osh_eval.mycpp.{h,cc}
 | 
| 59 |       mycpp/
 | 
| 60 |         examples/
 | 
| 61 |           cgi.mycpp.cc
 | 
| 62 |           cgi_raw.mycpp.cc
 | 
| 63 |           cgi.pea.cc
 | 
| 64 |           cgi_raw.pea.cc
 | 
| 65 |           expr.asdl.{h,cc}
 | 
| 66 | 
 | 
| 67 |     _build/
 | 
| 68 |       NINJA/  # part of the Ninja graph
 | 
| 69 |         asdl.asdl_main/
 | 
| 70 |           all-pairs.txt
 | 
| 71 |           deps.txt
 | 
| 72 | 
 | 
| 73 |       obj/
 | 
| 74 |         # The obj folder is a 2-tuple {cxx,clang}-{dbg,opt,asan ...}
 | 
| 75 |         cxx-dbg/
 | 
| 76 |           bin/
 | 
| 77 |             osh_eval.mycpp.o
 | 
| 78 |             osh_eval.mycpp.d     # dependency file
 | 
| 79 |             osh_eval.mycpp.json  # when -ftime-trace is passed
 | 
| 80 |           mycpp/
 | 
| 81 |             gc_heap_test.o  # not translated
 | 
| 82 |             gc_builtins.o   
 | 
| 83 |           _gen/
 | 
| 84 |             mycpp/
 | 
| 85 |               examples/
 | 
| 86 |                 cgi.mycpp.o
 | 
| 87 |                 cgi.mycpp.o.d
 | 
| 88 |                 cgi.pea.o
 | 
| 89 |                 cgi.pea.o.d
 | 
| 90 |                 expr.asdl.o
 | 
| 91 |                 expr.asdl.o.d
 | 
| 92 |         cxx-gcevery/
 | 
| 93 |         cxx-opt/
 | 
| 94 |         clang-coverage/
 | 
| 95 | 
 | 
| 96 |       preprocessed/
 | 
| 97 |         cxx-dbg/
 | 
| 98 |           cpp/
 | 
| 99 |             leaky_stdlib.cc
 | 
| 100 |         cxx-dbg.txt  # line counts
 | 
| 101 | 
 | 
| 102 |     _bin/
 | 
| 103 | 
 | 
| 104 |       # These are the code generators.  TODO: move to _bin/SCRIPT/asdl/asdl_main
 | 
| 105 |       shwrap/
 | 
| 106 |         asdl_main
 | 
| 107 |         mycpp_main
 | 
| 108 |         lexer_gen
 | 
| 109 |         ...
 | 
| 110 | 
 | 
| 111 |       # The _bin folder is a 3-tuple {cxx,clang}-{dbg,opt,asan ...}-{,sh}
 | 
| 112 |       cxx-opt/
 | 
| 113 |         osh_eval
 | 
| 114 |         osh_eval.stripped              # The end user binary, with top_level = True
 | 
| 115 |         osh_eval.symbols
 | 
| 116 | 
 | 
| 117 |         mycpp/
 | 
| 118 |           examples/
 | 
| 119 |             cgi.mycpp
 | 
| 120 |             cgi.mycpp.stripped
 | 
| 121 |             cgi.pea
 | 
| 122 |             cgi.pea.stripped
 | 
| 123 |           gc_heap_test
 | 
| 124 | 
 | 
| 125 |       cxx-opt-sh/                      # with shell script
 | 
| 126 |         cxx-gcevery/
 | 
| 127 |           mycpp/
 | 
| 128 |             gc_heap_test
 | 
| 129 | 
 | 
| 130 |       clang-coverage/
 | 
| 131 | 
 | 
| 132 |     _test/
 | 
| 133 |       tasks/        # *.txt and *.task.txt for .wwz
 | 
| 134 |         typecheck/  # optionally run
 | 
| 135 |         test/       # py, gcevery, asan, opt
 | 
| 136 |         benchmark/
 | 
| 137 | 
 | 
| 138 |         # optionally logged?
 | 
| 139 |         translate/
 | 
| 140 |         compile/
 | 
| 141 | 
 | 
| 142 | ### Python dev build
 | 
| 143 | 
 | 
| 144 |     # C code shared with the Python build
 | 
| 145 |     # eventually this can be moved into Ninja
 | 
| 146 |     _devbuild/
 | 
| 147 |       gen/
 | 
| 148 |         runtime_asdl.py
 |