From 0d756bacffd2a912973fee6a82e3173e2a63228c Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 18 May 2026 16:37:51 -0700 Subject: [PATCH 1/2] try to fix macos 13 --- src/passes/StringLifting.cpp | 2 +- src/support/json.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/passes/StringLifting.cpp b/src/passes/StringLifting.cpp index ac15d2a8614..dac1ff7c739 100644 --- a/src/passes/StringLifting.cpp +++ b/src/passes/StringLifting.cpp @@ -74,7 +74,7 @@ struct StringLifting : public Pass { if (!valid) { Fatal() << "Bad string to lift: " << wtf8; } - importedStrings[global->name] = wtf16.view(); + importedStrings[global->name] = wtf16.str(); found = true; } } diff --git a/src/support/json.cpp b/src/support/json.cpp index 94f3df082e7..cee3255db46 100644 --- a/src/support/json.cpp +++ b/src/support/json.cpp @@ -39,7 +39,7 @@ void Value::stringify(std::ostream& os, bool pretty, int indent) { [[maybe_unused]] bool valid = wasm::String::convertWTF8ToWTF16(wtf16, getIString().view()); assert(valid); - wasm::String::printEscapedJSON(os, wtf16.view()); + wasm::String::printEscapedJSON(os, wtf16.str()); return; } case Array: { From 9dd7e57e5f1a5a1af196ce249f81fc7c255f5b75 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 18 May 2026 16:42:19 -0700 Subject: [PATCH 2/2] recomment --- src/passes/StringLifting.cpp | 1 + src/support/json.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/passes/StringLifting.cpp b/src/passes/StringLifting.cpp index dac1ff7c739..2c8572c025a 100644 --- a/src/passes/StringLifting.cpp +++ b/src/passes/StringLifting.cpp @@ -74,6 +74,7 @@ struct StringLifting : public Pass { if (!valid) { Fatal() << "Bad string to lift: " << wtf8; } + // TODO: Use wtf16.view() once we have C++20. importedStrings[global->name] = wtf16.str(); found = true; } diff --git a/src/support/json.cpp b/src/support/json.cpp index cee3255db46..7858cfba319 100644 --- a/src/support/json.cpp +++ b/src/support/json.cpp @@ -39,6 +39,7 @@ void Value::stringify(std::ostream& os, bool pretty, int indent) { [[maybe_unused]] bool valid = wasm::String::convertWTF8ToWTF16(wtf16, getIString().view()); assert(valid); + // TODO: Use wtf16.view() once we have C++20. wasm::String::printEscapedJSON(os, wtf16.str()); return; }