@@ -227,7 +227,6 @@ def parse_args(newargs): # noqa: C901, PLR0912, PLR0915
227227 To revalidate these numbers, run `ruff check --select=C901,PLR091`.
228228 """
229229 options = EmccOptions ()
230- user_js_defines = []
231230 should_exit = False
232231 skip = False
233232
@@ -588,7 +587,8 @@ def consume_arg_file():
588587 value = '1'
589588 if key in settings .keys ():
590589 exit_with_error (f'{ arg } : cannot change built-in settings values with a -jsD directive. Pass -s{ key } ={ value } instead!' )
591- user_js_defines += [(key , value )]
590+ # Apply user -jsD settings
591+ settings [key ] = value
592592 newargs [i ] = ''
593593 elif check_flag ('-shared' ):
594594 options .shared = True
@@ -642,7 +642,7 @@ def consume_arg_file():
642642 sys .exit (0 )
643643
644644 newargs = [a for a in newargs if a ]
645- return options , user_js_defines , newargs
645+ return options , newargs
646646
647647
648648def expand_byte_size_suffixes (value ):
@@ -854,7 +854,7 @@ def parse_arguments(args):
854854 newargs [i ] += newargs [i + 1 ]
855855 newargs [i + 1 ] = ''
856856
857- options , user_js_defines , newargs = parse_args (newargs )
857+ options , newargs = parse_args (newargs )
858858
859859 if options .post_link or options .oformat == OFormat .BARE :
860860 diagnostics .warning ('experimental' , '--oformat=bare/--post-link are experimental and subject to change.' )
@@ -871,10 +871,6 @@ def parse_arguments(args):
871871 if strict_cmdline :
872872 settings .STRICT = int (strict_cmdline )
873873
874- # Apply user -jsD settings
875- for s in user_js_defines :
876- settings [s [0 ]] = s [1 ]
877-
878874 # Apply -s settings in newargs here (after optimization levels, so they can override them)
879875 apply_user_settings ()
880876
0 commit comments