Skip to content

Commit 179208a

Browse files
committed
Temporarily add WASM_BIGINT to dylink tests
This allows llvm/llvm-project#75242 to roll in. Also rename MIN_INT53 in library_int53.js to avoid conflicts with runtime_debug.js (this is needed because I enabled WASM_BIGINT in these tests which pulls in library_int53.js in more tests).
1 parent c890466 commit 179208a

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/library_int53.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,14 @@ addToLibrary({
130130
},
131131

132132
#if WASM_BIGINT
133-
$MAX_INT53: '{{{ Math.pow(2, 53) }}}',
134-
$MIN_INT53: '-{{{ Math.pow(2, 53) }}}',
133+
$INT53_MAX: '{{{ Math.pow(2, 53) }}}',
134+
$INT53_MIN: '-{{{ Math.pow(2, 53) }}}',
135135
// Counvert a bigint value (usually coming from Wasm->JS call) into an int53
136136
// JS Number. This is used when we have an incoming i64 that we know is a
137137
// pointer or size_t and is expected to be within the int53 range.
138138
// Returns NaN if the incoming bigint is outside the range.
139-
$bigintToI53Checked__deps: ['$MAX_INT53', '$MIN_INT53'],
140-
$bigintToI53Checked: (num) => (num < MIN_INT53 || num > MAX_INT53) ? NaN : Number(num),
139+
$bigintToI53Checked__deps: ['$INT53_MAX', '$INT53_MIN'],
140+
$bigintToI53Checked: (num) => (num < INT53_MIN || num > INT53_MAX) ? NaN : Number(num),
141141
#endif
142142
});
143143

test/test_core.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3986,6 +3986,11 @@ def test_dlfcn_preload(self):
39863986

39873987
def dylink_test(self, main, side, expected=None, header=None, force_c=False,
39883988
main_module=2, **kwargs):
3989+
# Temporarily enableing WASM_BIGINT in all dylink tests in order to allow
3990+
# a recent llvm change to land:
3991+
# https://github.com/llvm/llvm-project/pull/75242
3992+
# Once that lands we can use --no-shlib-sigcheck instead.
3993+
self.set_setting('WASM_BIGINT')
39893994
# Same as dylink_testf but take source code in string form
39903995
if not isinstance(side, list):
39913996
side_file = 'liblib.cpp' if not force_c else 'liblib.c'

0 commit comments

Comments
 (0)