Skip to content

Commit 3b91cc3

Browse files
authored
Fix corez.test_dylink_iostream (#17251)
More fallout from the libc_optz optimization. I think it would be great it we could get rid of EMCC_FORCE_STDLIBS since it causes a lot of odd issues like this.
1 parent 2fca55a commit 3b91cc3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ jobs:
395395
# also add a little select wasmfs testing
396396
test_targets: "
397397
core3
398+
corez.test_dylink_iostream
398399
core2ss.test_pthread_dylink
399400
core2ss.test_pthread_thread_local_storage
400401
wasm2js3.test_memorygrowth_2

src/library.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,11 +364,11 @@ mergeInto(LibraryManager.library, {
364364

365365
// In -Oz builds, we replace memcpy() altogether with a non-unrolled wasm
366366
// variant, so we should never emit emscripten_memcpy_big() in the build.
367-
// (However, in MAIN_MODULE=1 mode we link in all system libraries, which does
368-
// end up adding code that refers to this.)
369367
// In STANDALONE_WASM we avoid the emscripten_memcpy_big dependency so keep
370368
// the wasm file standalone.
371-
#if (SHRINK_LEVEL < 2 || LINKABLE) && !STANDALONE_WASM
369+
// In MAIN_MODULE=1 or EMCC_FORCE_STDLIBS mode all of libc is force included
370+
// so we cannot override parts of it, and therefore cannot use libc_optz.
371+
#if (SHRINK_LEVEL < 2 || LINKABLE || process.env.EMCC_FORCE_STDLIBS) && !STANDALONE_WASM
372372

373373
emscripten_memcpy_big__sig: 'vppp',
374374
#if MIN_CHROME_VERSION < 45 || MIN_EDGE_VERSION < 14 || MIN_FIREFOX_VERSION < 34 || MIN_IE_VERSION != TARGET_NOT_SUPPORTED || MIN_SAFARI_VERSION < 100101

0 commit comments

Comments
 (0)