Skip to content

Commit

Permalink
[unity]mac debug版本打开jit,cli构建添加jitless选项
Browse files Browse the repository at this point in the history
  • Loading branch information
chexiongsheng committed Dec 31, 2024
1 parent e0a0271 commit 2f427fa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions unity/cli/cmd.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ program
.option('-G, --generator <generator-name>', 'cmake generator name')
.option('-ts, --thread_safe', 'thread safe')
.option('-wi, --with_inspector', 'with inspector')
.option('-jl, --jitless', 'jitless')
.action(function (quickcommand, options) {
let backend = options.backend;
let config = options.config;
Expand Down
4 changes: 4 additions & 0 deletions unity/cli/make.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ async function runPuertsMake(cwd, options) {
console.log('################################## thread_safe ##################################');
BackendConfig.definition.push("THREAD_SAFE");
}
if (options.jitless)) {
console.log('################################## jitless ##################################');
BackendConfig.definition.push("JITLESS");
}
const definitionD = (BackendConfig.definition || []).join(';');
const linkD = (BackendConfig['link-libraries'][options.platform]?.[options.arch] || []).join(';');
const incD = (BackendConfig.include || []).join(';');
Expand Down
5 changes: 1 addition & 4 deletions unity/native_src/Src/BackendEnv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,8 @@ void FBackendEnv::GlobalPrepare()
std::string Flags = "--stack_size=856";
#if PUERTS_DEBUG
Flags += " --expose-gc";
#if PLATFORM_MAC
Flags += " --jitless --no-expose-wasm";
#endif
#endif
#if defined(PLATFORM_IOS) || defined(PLATFORM_OHOS)
#if defined(PLATFORM_IOS) || defined(PLATFORM_OHOS) || defined(JITLESS)
Flags += " --jitless --no-expose-wasm";
#endif
#if V8_MAJOR_VERSION <= 9
Expand Down

0 comments on commit 2f427fa

Please sign in to comment.