Skip to content

Commit

Permalink
Use description from mattip
Browse files Browse the repository at this point in the history
  • Loading branch information
hoodmane authored and charris committed Mar 31, 2022
1 parent f1c1014 commit 543e135
Showing 1 changed file with 7 additions and 23 deletions.
30 changes: 7 additions & 23 deletions doc/release/upcoming_changes/21154.improvement.rst
@@ -1,23 +1,7 @@
Math C library feature detection now works for wasm
---------------------------------------------------
The previous feature detection generated C stubs like:

.. code-block:: C
void exp(void); // incorrect signature!
exp();
Then checked whether compiling and linking these worked. This generates warnings
that complain that ``exp`` actually has signature ``double exp(double)`` but would
otherwise work. However ``wasm-ld`` creates a hard error in this case, so when
compiling to a wasm target everything is detected as missing.

This is now fixed: we feature detect instead with code like:

.. code-block:: C
double exp(double); // correct signature!
exp((double)0);
which ``wasm-ld`` will link. As a side effect, the feature detection code now
works without generating linker warnings.
Math C library feature detection now uses correct signatures
------------------------------------------------------------
Compiling is preceded by a detection phase to determine whether the
underlying libc supports certain math operations. Previously this code
did not respect the proper signatures. Fixing this enables compilation
for the ``wasm-ld`` backend (compilation for web assembly) and reduces
the number of warnings.

0 comments on commit 543e135

Please sign in to comment.