(self)
| 58 | logging.debug("build runtime at host env: {}".format(self.BUILD_ENV)) |
| 59 | |
| 60 | def build(self): |
| 61 | self.detect_build_env() |
| 62 | parser = argparse.ArgumentParser( |
| 63 | formatter_class=argparse.RawTextHelpFormatter) |
| 64 | parser.add_argument( |
| 65 | "--cross_build", |
| 66 | action="store_true", |
| 67 | help= |
| 68 | "args for indicates cross build, when without this flags, means host build", |
| 69 | ) |
| 70 | parser.add_argument( |
| 71 | "--host_build_for_32bit", |
| 72 | action="store_true", |
| 73 | help="args for host build 32bit, only take effect for host build", |
| 74 | ) |
| 75 | parser.add_argument( |
| 76 | "--build_for_debug", |
| 77 | action="store_true", |
| 78 | help="Build with Debug mode, default Release mode", |
| 79 | ) |
| 80 | parser.add_argument( |
| 81 | "--build_achieve_all", |
| 82 | action="store_true", |
| 83 | help= |
| 84 | "static link libc and libm, just for example executable, not for library", |
| 85 | ) |
| 86 | parser.add_argument("--build_with_asan", |
| 87 | action="store_true", |
| 88 | help="Build with asan check") |
| 89 | parser.add_argument( |
| 90 | "--remove_old_build", |
| 91 | action="store_true", |
| 92 | help="remove old build dir before ninja, default off", |
| 93 | ) |
| 94 | parser.add_argument( |
| 95 | "--build_with_ninja_verbose", |
| 96 | action="store_true", |
| 97 | help="ninja with verbose and explain, default off", |
| 98 | ) |
| 99 | parser.add_argument( |
| 100 | "--build_with_callback_register", |
| 101 | action="store_true", |
| 102 | help= |
| 103 | "build with callback register for api malloc/free/log/time/file", |
| 104 | ) |
| 105 | parser.add_argument( |
| 106 | "--build_tensor_alloc_sanity", |
| 107 | action="store_true", |
| 108 | help="Build with sanity alloc tensor, used with asan", |
| 109 | ) |
| 110 | parser.add_argument( |
| 111 | "--build_with_profile", |
| 112 | action="store_true", |
| 113 | help="Build with profile for run model", |
| 114 | ) |
| 115 | parser.add_argument( |
| 116 | "--build_with_dump_tensor", |
| 117 | action="store_true", |
no test coverage detected