[browser] prevent <DebuggerSupport> from disabling interp optimizations (#85792)
authorPavel Savara <pavel.savara@gmail.com>
Fri, 5 May 2023 17:03:24 +0000 (19:03 +0200)
committerGitHub <noreply@github.com>
Fri, 5 May 2023 17:03:24 +0000 (13:03 -0400)
commit9b65e23a67c6130a28f848e42b6088820b7e4e59
tree01a55b25d2cf1a431cb81363a472fd111555d06d
parent9abc5a95be8e2b1193ed71cd041763b62a93654d
[browser] prevent <DebuggerSupport> from disabling interp optimizations (#85792)

* [wasm] Don't enable debugging for library tests by default

@pavelsavara and @brzvlad found that some tests like
System.Collections.Immutable.Tests run slower because the runtime has
debugging enabled which causes the interpreter to disable optimizations.

Reason:

- Some tests depend on debugger attributes, and thus set
  `$(DebuggerSupport)=true` to preserve them while linking.
- Which sets `$(WasmDebugLevel)=-1`. But setting `$(WasmDebugLevel)<0`
  enables debugging support in the runtime.

- So, set this to `<0` only when building with `Configuration=Debug` .

* set it to zero only on CI

---------

Co-authored-by: Ankit Jain <radical@gmail.com>
eng/testing/tests.browser.targets
eng/testing/tests.wasi.targets
eng/testing/tests.wasm.targets