Skip to content

Commit

Permalink
fix #17267 (#17273)
Browse files Browse the repository at this point in the history
* remove unnecessary when statement

* remove outdated codes

* reuse jsffi

* move js json coverage

* fix #17267

* address comments

* Update compiler/main.nim

* Update tests/threads/tjsthreads.nim
  • Loading branch information
ringabout authored Mar 7, 2021
1 parent 0e3ea16 commit d1e0932
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 5 additions & 2 deletions compiler/commands.nim
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,9 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
of "hintaserror": processSpecificNote(arg, wHintAsError, pass, info, switch, conf)
of "hints":
if processOnOffSwitchOrList(conf, {optHints}, arg, pass, info): listHints(conf)
of "threadanalysis": processOnOffSwitchG(conf, {optThreadAnalysis}, arg, pass, info)
of "threadanalysis":
if conf.backend == backendJs: discard
else: processOnOffSwitchG(conf, {optThreadAnalysis}, arg, pass, info)
of "stacktrace": processOnOffSwitch(conf, {optStackTrace}, arg, pass, info)
of "stacktracemsgs": processOnOffSwitch(conf, {optStackTraceMsgs}, arg, pass, info)
of "excessivestacktrace": processOnOffSwitchG(conf, {optExcessiveStackTrace}, arg, pass, info)
Expand Down Expand Up @@ -670,7 +672,8 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
of "linedir": processOnOffSwitch(conf, {optLineDir}, arg, pass, info)
of "assertions", "a": processOnOffSwitch(conf, {optAssert}, arg, pass, info)
of "threads":
processOnOffSwitchG(conf, {optThreads}, arg, pass, info)
if conf.backend == backendJs: discard
else: processOnOffSwitchG(conf, {optThreads}, arg, pass, info)
#if optThreads in conf.globalOptions: conf.setNote(warnGcUnsafe)
of "tlsemulation": processOnOffSwitchG(conf, {optTlsEmulation}, arg, pass, info)
of "implicitstatic":
Expand Down
6 changes: 6 additions & 0 deletions tests/threads/tjsthreads.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
discard """
targets: "c cpp js"
matrix: "--threads"
"""

echo 123

0 comments on commit d1e0932

Please sign in to comment.