Skip to content

Commit 9f291d8

Browse files
committed
Merge branch 'main' into update_libcxx_libcxxabi_19
2 parents 643050f + c35d60a commit 9f291d8

File tree

164 files changed

+3103
-2429
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+3103
-2429
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,7 @@ jobs:
799799
EMTEST_SKIP_NODE_CANARY: "1"
800800
EMTEST_SKIP_RUST: "1"
801801
EMTEST_SKIP_WASM64: "1"
802+
EMTEST_SKIP_NEW_CMAKE: "1"
802803
steps:
803804
- install-rust
804805
- run: apt-get install -q -y ninja-build scons ccache

ChangeLog.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ to browse the changes between the tags.
1818

1919
See docs/process.md for more on how version tagging works.
2020

21-
3.1.73 (in development)
21+
3.1.74 (in development)
2222
-----------------------
23+
24+
3.1.73 - 11/28/24
25+
-----------------
2326
- libunwind was updated to LLVM 19.1.4. (#22394)
2427

2528
3.1.72 - 11/19/24

cmake/Modules/Platform/Emscripten.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,10 @@ set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES 1)
279279
set(CMAKE_C_RESPONSE_FILE_LINK_FLAG "@")
280280
set(CMAKE_CXX_RESPONSE_FILE_LINK_FLAG "@")
281281

282+
# Enable $<LINK_LIBRARY:WHOLE_ARCHIVE,static_lib> for CMake 3.24+
283+
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE "-Wl,--whole-archive" "<LINK_ITEM>" "-Wl,--no-whole-archive")
284+
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED True)
285+
282286
# Set a global EMSCRIPTEN variable that can be used in client CMakeLists.txt to
283287
# detect when building using Emscripten.
284288
set(EMSCRIPTEN 1 CACHE INTERNAL "If true, we are targeting Emscripten output.")

emscripten-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.73-git
1+
3.1.74-git

src/cpuprofiler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ var emscriptenCpuProfiler = {
593593
detectWebGLContext() {
594594
if (Module['canvas']?.GLctxObject?.GLctx) return Module['canvas'].GLctxObject.GLctx;
595595
else if (typeof GLctx != 'undefined') return GLctx;
596-
else if (Module.ctx) return Module.ctx;
596+
else if (Module['ctx']) return Module['ctx'];
597597
return null;
598598
},
599599

src/library.js

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2182,25 +2182,19 @@ addToLibrary({
21822182
},
21832183

21842184
$asyncLoad__docs: '/** @param {boolean=} noRunDep */',
2185-
$asyncLoad: (url, onload, onerror, noRunDep) => {
2186-
var dep = !noRunDep ? getUniqueRunDependency(`al ${url}`) : '';
2187-
readAsync(url).then(
2188-
(arrayBuffer) => {
2189-
#if ASSERTIONS
2190-
assert(arrayBuffer, `Loading data file "${url}" failed (no arrayBuffer).`);
2191-
#endif
2192-
onload(new Uint8Array(arrayBuffer));
2193-
if (dep) removeRunDependency(dep);
2194-
},
2195-
(err) => {
2196-
if (onerror) {
2197-
onerror();
2198-
} else {
2199-
throw `Loading data file "${url}" failed.`;
2200-
}
2201-
}
2202-
);
2203-
if (dep) addRunDependency(dep);
2185+
$asyncLoad: (url, noRunDep) => {
2186+
return new Promise((resolve, reject) => {
2187+
var dep = !noRunDep ? getUniqueRunDependency(`al ${url}`) : '';
2188+
if (dep) addRunDependency(dep);
2189+
readAsync(url).then(
2190+
(arrayBuffer) => {
2191+
#if ASSERTIONS
2192+
assert(arrayBuffer, `Loading data file "${url}" failed (no arrayBuffer).`);
2193+
#endif
2194+
resolve(new Uint8Array(arrayBuffer));
2195+
if (dep) removeRunDependency(dep);
2196+
}, reject);
2197+
});
22042198
},
22052199

22062200
$alignMemory: (size, alignment) => {

src/library_async.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,8 @@ addToLibrary({
470470
emscripten_wget_data__async: true,
471471
emscripten_wget_data: (url, pbuffer, pnum, perror) => {
472472
return Asyncify.handleSleep((wakeUp) => {
473-
asyncLoad(UTF8ToString(url), (byteArray) => {
473+
/* no need for run dependency, this is async but will not do any prepare etc. step */
474+
asyncLoad(UTF8ToString(url), /*noRunDep=*/true).then((byteArray) => {
474475
// can only allocate the buffer after the wakeUp, not during an asyncing
475476
var buffer = _malloc(byteArray.length); // must be freed by caller!
476477
HEAPU8.set(byteArray, buffer);
@@ -481,7 +482,7 @@ addToLibrary({
481482
}, () => {
482483
{{{ makeSetValue('perror', 0, '1', 'i32') }}};
483484
wakeUp();
484-
}, true /* no need for run dependency, this is async but will not do any prepare etc. step */ );
485+
});
485486
});
486487
},
487488

src/library_browser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ var LibraryBrowser = {
192192
},
193193

194194
createContext(/** @type {HTMLCanvasElement} */ canvas, useWebGL, setInModule, webGLContextAttributes) {
195-
if (useWebGL && Module.ctx && canvas == Module['canvas']) return Module.ctx; // no need to recreate GL context if it's already been created for this canvas.
195+
if (useWebGL && Module['ctx'] && canvas == Module['canvas']) return Module['ctx']; // no need to recreate GL context if it's already been created for this canvas.
196196

197197
var ctx;
198198
var contextHandle;
@@ -235,7 +235,7 @@ var LibraryBrowser = {
235235
#if ASSERTIONS
236236
if (!useWebGL) assert(typeof GLctx == 'undefined', 'cannot set in module if GLctx is used, but we are a non-GL context that would replace it');
237237
#endif
238-
Module.ctx = ctx;
238+
Module['ctx'] = ctx;
239239
if (useWebGL) GL.makeContextCurrent(contextHandle);
240240
Browser.useWebGL = useWebGL;
241241
Browser.moduleContextCreatedCallbacks.forEach((callback) => callback());

src/library_dylink.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ var LibraryDylink = {
10241024

10251025
var libFile = locateFile(libName);
10261026
if (flags.loadAsync) {
1027-
return new Promise((resolve, reject) => asyncLoad(libFile, resolve, reject));
1027+
return asyncLoad(libFile);
10281028
}
10291029

10301030
// load the binary synchronously

src/library_eventloop.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ LibraryJSEventLoop = {
472472
}
473473

474474
#if ASSERTIONS
475-
if (MainLoop.method === 'timeout' && Module.ctx) {
475+
if (MainLoop.method === 'timeout' && Module['ctx']) {
476476
warnOnce('Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!');
477477
MainLoop.method = ''; // just warn once per call to set main loop
478478
}

0 commit comments

Comments
 (0)