Commit 8d041ba
authored
Fix external useage of EM_JS function (#18928)
When no local usage of an EM_JS function is present the compiler was
completely removing the import of the function (and its import_name).
With this change we force at least one reference to the function by
taking its address in an otherwise unused (and GC-able) pointer.
This use case was broken by the switch to LLD_REPORT_UNDEFINED in #16003.
Fixes: #189271 parent 22de70e commit 8d041ba
2 files changed
+37
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| |||
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
53 | 60 | | |
54 | 61 | | |
55 | 62 | | |
| |||
59 | 66 | | |
60 | 67 | | |
61 | 68 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
68 | 76 | | |
69 | 77 | | |
70 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11914 | 11914 | | |
11915 | 11915 | | |
11916 | 11916 | | |
| 11917 | + | |
| 11918 | + | |
| 11919 | + | |
| 11920 | + | |
| 11921 | + | |
| 11922 | + | |
| 11923 | + | |
| 11924 | + | |
| 11925 | + | |
| 11926 | + | |
| 11927 | + | |
| 11928 | + | |
| 11929 | + | |
| 11930 | + | |
| 11931 | + | |
| 11932 | + | |
| 11933 | + | |
| 11934 | + | |
| 11935 | + | |
| 11936 | + | |
| 11937 | + | |
| 11938 | + | |
| 11939 | + | |
11917 | 11940 | | |
11918 | 11941 | | |
11919 | 11942 | | |
| |||
0 commit comments