1 /* 2 * Copyright (c) 2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef OHOS_ARKCOMPILER_AOT_ARGS_LIST_H 17 #define OHOS_ARKCOMPILER_AOT_ARGS_LIST_H 18 19 #include <string> 20 #include <unordered_set> 21 22 namespace OHOS::ArkCompiler { 23 24 constexpr const char* AOT_EXE = "/system/bin/ark_aot_compiler"; 25 constexpr const char* STATIC_AOT_EXE = "/system/bin/ark_aot"; 26 27 std::unordered_set<std::string> aotArgsList { 28 "aot-file", 29 "ark-properties", 30 "ark-bundleName", 31 "asm-interpreter", 32 "asm-opcode-disable-range", 33 "builtins-lazy", 34 "compiler-log", 35 "compiler-log-methods", 36 "compiler-log-snapshot", 37 "compiler-log-time", 38 "compiler-type-threshold", 39 "enable-ark-tools", 40 "compiler-trace-bc", 41 "compiler-trace-deopt", 42 "compiler-trace-inline", 43 "compiler-trace-value-numbering", 44 "compiler-trace-instruction-combine", 45 "compiler-max-inline-bytecodes", 46 "compiler-deopt-threshold", 47 "compiler-device-state", 48 "compiler-thermal-level", 49 "compiler-stress-deopt", 50 "compiler-opt-code-profiler", 51 "compiler-opt-bc-range", 52 "compiler-opt-bc-range-help", 53 "enable-force-gc", 54 "enable-ic", 55 "enable-runtime-stat", 56 "compiler-opt-constant-folding", 57 "compiler-opt-array-bounds-check-elimination", 58 "compiler-opt-type-lowering", 59 "compiler-opt-early-elimination", 60 "compiler-opt-later-elimination", 61 "compiler-opt-instr-combine", 62 "compiler-opt-string", 63 "compiler-opt-value-numbering", 64 "compiler-opt-new-value-numbering", 65 "compiler-opt-inlining", 66 "compiler-opt-pgotype", 67 "compiler-opt-track-field", 68 "entry-point", 69 "force-full-gc", 70 "force-shared-gc-frequency", 71 "gc-thread-num", 72 "heap-size-limit", 73 "icu-data-path", 74 "enable-worker", 75 "log-components", 76 "log-debug", 77 "log-error", 78 "log-fatal", 79 "log-info", 80 "log-level", 81 "log-warning", 82 "gc-long-paused-time", 83 "compiler-opt-max-method", 84 "compiler-module-methods", 85 "max-unmovable-space", 86 "merge-abc", 87 "enable-context", 88 "compiler-opt-level", 89 "reloc-mode", 90 "serializer-buffer-size-limit", 91 "startup-time", 92 "stub-file", 93 "compiler-target-triple", 94 "enable-print-execute-time", 95 "enable-pgo-profiler", 96 "enable-mutant-array", 97 "enable-elements-kind", 98 "compiler-pgo-profiler-path", 99 "compiler-pgo-hotness-threshold", 100 "compiler-pgo-save-min-interval", 101 "compiler-verify-vtable", 102 "compiler-select-methods", 103 "compiler-skip-methods", 104 "target-compiler-mode", 105 "hap-path", 106 "hap-abc-offset", 107 "hap-abc-size", 108 "compiler-no-check", 109 "compiler-pipeline-host-aot", 110 "compiler-fast-compile", 111 "compiler-opt-loop-peeling", 112 "compiler-opt-array-onheap-check", 113 "compiler-pkg-info", 114 "compiler-external-pkg-info", 115 "compiler-enable-external-pkg", 116 "compiler-framework-abc-path", 117 "compiler-enable-lexenv-specialization", 118 "compiler-enable-native-inline", 119 "compiler-enable-lowering-builtin", 120 "compiler-enable-litecg", 121 "compiler-enable-jit", 122 "compiler-enable-osr", 123 "compiler-trace-jit", 124 "compiler-jit-hotness-threshold", 125 "compiler-osr-hotness-threshold", 126 "compiler-force-jit-compile-main", 127 "compiler-enable-jit-pgo", 128 "compiler-enable-aot-pgo", 129 "compiler-enable-framework-aot", 130 "compiler-enable-profile-dump", 131 "compiler-typed-op-profiler", 132 "compiler-opt-branch-profiling", 133 "test-assert", 134 "compiler-methods-range", 135 "compiler-codegen-options", 136 "compiler-opt-escape-analysis", 137 "compiler-trace-escape-analysis", 138 "compiler-opt-induction-variable", 139 "compiler-trace-induction-variable", 140 "compiler-memory-analysis", 141 "compiler-check-pgo-version", 142 "compiler-enable-baselinejit", 143 "compiler-baselinejit-hotness-threshold", 144 "compiler-force-baselinejit-compile-main", 145 "compiler-baseline-pgo", 146 "compiler-trace-builtins", 147 }; 148 149 std::unordered_set<std::string> staticAOTArgsList { 150 "boot-panda-files", 151 "paoc-panda-files", 152 "paoc-output", 153 "load-runtimes", 154 "paoc-use-cha", 155 }; 156 157 std::vector<std::string> staticAOTDefaultArgs { 158 "--load-runtimes=ets", 159 "--compiler-enable-fast-interop=false", 160 "--compiler-lower-boxed-boolean=false", 161 "--paoc-zip-panda-file=ets/modules_static.abc" 162 }; 163 164 std::vector<std::string> staticFrameworkAOTDefaultArgs { 165 "--load-runtimes=ets", 166 "--compiler-enable-fast-interop=false", 167 "--compiler-lower-boxed-boolean=false" 168 }; 169 170 } // namespace OHOS::ArkCompiler 171 #endif // OHOS_ARKCOMPILER_AOT_ARGS_LIST_H 172