Skip to content

Commit c972c27

Browse files
committed
meson: propagate optimization flag for linking on Emscripten
Signed-off-by: Kohei Tokunaga <[email protected]>
1 parent 60a0ede commit c972c27

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

meson.build

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,6 +880,10 @@ elif host_os == 'openbsd'
880880
# Disable OpenBSD W^X if available
881881
emulator_link_args = cc.get_supported_link_arguments('-Wl,-z,wxneeded')
882882
endif
883+
elif host_os == 'emscripten'
884+
if get_option('optimization') != 'plain'
885+
emulator_link_args += ['-O' + get_option('optimization')]
886+
endif
883887
endif
884888

885889
###############################################

0 commit comments

Comments
 (0)