diff options
author | David Skoland <david.skoland@qt.io> | 2022-11-07 18:47:12 +0100 |
---|---|---|
committer | David Skoland <david.skoland@qt.io> | 2022-11-24 18:49:40 +0100 |
commit | ef7d17ed159600d54c211ade656285eaf095f155 (patch) | |
tree | 57ef286e86b25750023d21f5f7d528d83c159dc3 /cmake/QtTestHelpers.cmake | |
parent | 770c849a31266beeb1b71f390d8119a0504d8ce6 (diff) |
wasm: Enable asyncify for tests
Since a good number of tests use exec and friends, we want to use
asyncify for them. Asyncify is still possible to enable universally
with device options.
Change-Id: I0916f55328c98f2ba179cda3757eeee9d27f3e47
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'cmake/QtTestHelpers.cmake')
-rw-r--r-- | cmake/QtTestHelpers.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/QtTestHelpers.cmake b/cmake/QtTestHelpers.cmake index 43b75768f0..e08ba7c8e6 100644 --- a/cmake/QtTestHelpers.cmake +++ b/cmake/QtTestHelpers.cmake @@ -558,6 +558,11 @@ function(qt_internal_add_test name) # TODO: Add functionality to specify browser list(APPEND extra_test_args "--browser=chrome") + # We always want to enable asyncify for tests, as some of them use exec + # Optimize for size (-Os), since asyncify tends to make the resulting + # binary very large + target_link_options("${name}" PRIVATE "SHELL:-s ASYNCIFY" "-Os") + # This tells cmake to run the tests with this script, since wasm files can't be # executed directly set_property(TARGET "${name}" PROPERTY CROSSCOMPILING_EMULATOR "emrun") |